
Originally Posted by
spf
Be very careful with current GCO module in handling coupon. I just found out Zen-CART does not physically delete the coupon when I delete them. They just put them in inactive state. Using other checkout methods, Zen-Cart will not allow using those inactive coupon. However, GCO still use those coupon regardless whether they are inactive, or they have already been expired. The only way to prevent people using those expired coupon is to increase minimal order to some large number, say $9999.
ropu, can you verify this is the bug and come up with a quick fix? thanks
Spf
thx again for the report.
try this patch
responsehandler.php line 284
change
PHP Code:
$coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_input($curr_code['code']) . "' and coupon_type != 'G'");
with
PHP Code:
$coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_code = '" . zen_db_input($curr_code['code']) . "' and coupon_type != 'G' and coupon_active = 'Y' and coupon_expire_date >= now() and coupon_start_date < now()");
tell us if it worked, iv just tried with the demo site, and expired coupons, not yet available ones and not active one are not more valid coupons.
hope this helps!
thank you very much
ropu
Bookmarks