Cart-Lab Blog

X-Cart & E-commerce related news, resources and tips. Postings by: B00MER of Cart-Lab.com


Sunday, October 12, 2003

Discount Coupon Modification

Keep Customers from using Discount coupons to get a zero amount total or from going below the Minimum Total Allowed in the X-Cart Admin->General Settings. The following code was added to customer/cart.php:
# Keep discount coupons away from free totals
if($cart["discount_coupon"]!="") {
if ($mode=="checkout" && !func_is_cart_empty($cart) && ($cart["total_cost"]<$config["General"]["minimal_order_amount"])) {
header ("Location: error_message.php?error_min_order");
exit;
}
} else {
if ($mode=="checkout" && !func_is_cart_empty($cart) && ($cart["sub_total"]<$config["General"]["minimal_order_amount"])) {
header ("Location: error_message.php?error_min_order");
exit;
}
}

Also more postings will be made soon, so be sure and keep an eye out for more postings as well as new products on CartLab!

Cart-Lab.com: X-cart Resources, and More!

Blinkbits
co.mments
Delicious
digg
Furl it!
NewsVine
Reddit
Spurl
TailRank
DZone
Google Bookmarks
taggly
Windows Live Favorites
addtoany
technorati