Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Coupon Minimum Order not working

Coupon Minimum Order not working

Views: 2,233

Results 1 to 5 of 5
22 Jul 2011, 22:30
#1
dropdeadfred avatar

dropdeadfred

New Zenner

Join Date:
Mar 2009
Posts:
2
Plugin Contributions:
0

Coupon Minimum Order not working

Using v1.3.9h, upgraded, but I don't know from what - added zonetables, but not much else.

I've got a working coupon code for a fixed amount off, restricted to one item. Free shipping not checked, etc, everything working fine. If I go in and set any minimum order over the cost of the item it stops working with the message...

You must spend at least $X.XX to redeem this coupon

If I do it for the item price or less it works fine, but if I do it for more than the price of the item it is restricted too, it doesn't work.

My intent is that if the spend $X amount like $100 they get $10 off a specific item using the coupon code. But apparently it the minimum order amount is looking only at the single restricted item amount instead of the sub-total.

Is that how it is supposed to work? :huh:

Thanks!

23 Jul 2011, 02:39
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Minimum Order not working

At this time, the minimum order is based on the Products allowed ...

03 Feb 2012, 14:05
#3
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Coupon Minimum Order not working

(I'm running 1.3.9h, and I don't want to upgrade to 1.5, because of the many hours I've spent to modify my cart the way it works now - If I upgrade, I have to do all this work over again)

How come it is made like this Ajeh?

Wouldn't it be better to actually use the "total order value" in the shoppingcart, when a coupon has a product restriction, than using the price for the product the coupon is for?

If a product is priced 100, and we set a coupon for 10 off if purchase is > 200.

If the coupon should work - the way it is now - the customer has to purchase 2 x product with price 100 = 200

What if the customer wants to purchase several other products, and total cart value is 2500 ?
He will still get the message: "You have to spend at least 200 to make the coupon work" - unless he has placed to of the products worth 100 in the cart
(if the coupon has restrictions to this product)

Any way to fix this in ot_coupon.php

03 Feb 2012, 14:20
#4
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Coupon Minimum Order not working

Maybe I found the answer here my self?

In ot_coupon.php - Line 377 - 379

I changed this:

// left for total order amount vs qualified order amount just switch the commented lines
// if ($orderTotalDetails['totalFull'] >= $coupon->fields['coupon_minimum_order']) {
if (strval($orderTotalDetails['total']) >= $coupon->fields['coupon_minimum_order']) {

To this:

// left for total order amount vs qualified order amount just switch the commented lines
if ($orderTotalDetails['totalFull'] >= $coupon->fields['coupon_minimum_order']) {
// if (strval($orderTotalDetails['total']) >= $coupon->fields['coupon_minimum_order']) {

Seems to be working...

03 Feb 2012, 17:42
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon Minimum Order not working

Thanks for the update that that change was able to work for you in v1.3.9h ... :smile: