If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Coupon Product Restrictions Guru Help Please

Coupon Product Restrictions Guru Help Please

Started by philip937 on 17 May 2013, 7:53 AM · Views: 1,489

Results 1 to 12 of 12
17 May 2013, 7:53 AM
#1
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Post #1 by philip937

Only just realised this when I was setting up a new offer

I was attempting to create a coupon that discounts the value of a particular item when the order total is over £50.

So I set min order £50
Then product restriction with the product that would be discounted

I now realise zen can't do this. It was expecting. £50 worth of the restricted product not the order total.

What I want to try and achieve is:

Coupon valid when:

Restricted product is present in cart
And
Overall shopping cart value is above £50

Can any of the gurus advise how I can modify the code to make it work in this way please?

Thanks

Phil Rogers
A problem shared is a problem solved.

17 May 2013, 1:30 PM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

See if the changes made to:
/includes/modules/order_total/ot_coupon.php

that I posted in post #15 of this thread:
http://www.zen-cart.com/showthread.php?195561-Discount-Coupon-Restrictions-question

does what you are trying to accomplish ...

Be sure to test completely ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 May 2013, 1:48 PM
#3
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Post #3 by philip937

Thanks Ajeh ill give it a try :-) is it ok for v1.5.1?

Phil Rogers
A problem shared is a problem solved.

17 May 2013, 1:57 PM
#4
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Post #4 by philip937

Another thing I've noticed is that if you apply the coupon to a cart without the product that needs to be in there for coupon to work it actually just says you need to spend at least £50 rather than saying, this coupon is not valid for products in your cart? Am I doing something wrong there too?

Phil Rogers
A problem shared is a problem solved.

17 May 2013, 2:38 PM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

Let's say you have restrictions set to all the Products in DVD ... Action ... and the Minimum is for $75 ...

Failure to have $75 in cart and NO qualifying Product:
If your cart holds less than $75.00 and NO Products from DVD ... Action ... you see the message:

You must spend at least $75.00 to redeem this coupon

Failure to have $75 in cart and qualifying Product:
If your cart holds less than $75.00 and qualifying Products from DVD ... Action ... you see the message:

You must spend at least $75.00 to redeem this coupon

Failure to have qualifying Product in cart but meet the minimum $75 or more:
If your cart holds $75.00 or more and NO Products from DVD ... Action ... you see the message:

This coupon code is not valid for any product currently in your cart. MIN75REST

Qualifying Product in cart and meet the minimum of $75 or more:
If your cart holds $75 or more and has 1 or more Products from DVD ... Action ... you see the message:

Congratulations you have redeemed the Discount Coupon

You could always try to customize your messages further ...

We are debating on methods to enhance the Discount Coupons and restrictions and basing minimum on Total vs qualifying Product total and whether to do this at the Order Total Module level or at the Coupon level or to leave this for customization by the domain ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 May 2013, 4:07 PM
#6
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Post #6 by philip937

Ajeh:

Let's say you have restrictions set to all the Products in DVD ... Action ... and the Minimum is for $75 ...

Failure to have $75 in cart and NO qualifying Product:
If your cart holds less than $75.00 and NO Products from DVD ... Action ... you see the message:

Failure to have $75 in cart and qualifying Product:
If your cart holds less than $75.00 and qualifying Products from DVD ... Action ... you see the message:

Failure to have qualifying Product in cart but meet the minimum $75 or more:
If your cart holds $75.00 or more and NO Products from DVD ... Action ... you see the message:

Qualifying Product in cart and meet the minimum of $75 or more:
If your cart holds $75 or more and has 1 or more Products from DVD ... Action ... you see the message:

You could always try to customize your messages further ...

We are debating on methods to enhance the Discount Coupons and restrictions and basing minimum on Total vs qualifying Product total and whether to do this at the Order Total Module level or at the Coupon level or to leave this for customization by the domain ...

Genius, works perfect as I would expect. thankyou :)

Phil Rogers
A problem shared is a problem solved.

17 May 2013, 5:00 PM
#7
ajeh avatar

ajeh

Oba-san

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

Post #7 by ajeh

I am working on making one that catches all messages before the redirect to checkout_payment so that all issues can be seen at one time ...

Still have to decide the best way to handle the Minimum on Restricted Products vs Cart Total ... this one won't be fun ... :blink:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

17 May 2013, 5:09 PM
#8
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Post #8 by philip937

What your done so far does the job, would be good to see all messages but hey it's not to much of a biggy :-)

Phil Rogers
A problem shared is a problem solved.

17 May 2013, 5:13 PM
#9
ajeh avatar

ajeh

Oba-san

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

Post #9 by ajeh

But you "know" that issue now bugs me ... and I so hate to be "bugged" by an issue that should be tidied up to make things easier for the customer experience ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 May 2013, 3:54 PM
#10
firebug avatar

firebug

New Zenner

Join Date:
Mar 2011
Location:
Georgia
Posts:
26
Plugin Contributions:
0

Post #10 by firebug

Using v1.5.1 with a fresh install.

Hello, I have an issue with the coupon codes. For instance when you add a product like the one below to the cart and go to checkout then put the coupon code “spring” in and click update it says “you must spend at least $100.00 to redeem this coupon” and the item is well over $100.00. This particular item is restricted from the use of the coupon code “spring” but it is confusing customers. How can I make it where it says “This coupon code is not valid for any product currently in your cart”. This seemed to work correctly before I upgraded from v1.39. I have also set up a coupon code “spring test” and denied all in category with no minimum order requirements and it says “you must spend at least $0.00 to redeem this coupon”. If anyone has any idea why this is happening I really would appreciate you sharing it with me.

As you can see I put a space in the domain below.

http://www.fines gas.com/details/fire_pits/fire_rings/complete_fire_pits/492006650598.html

7 Jun 2013, 2:33 PM
#11
firebug avatar

firebug

New Zenner

Join Date:
Mar 2011
Location:
Georgia
Posts:
26
Plugin Contributions:
0

Post #11 by firebug

I figured out what my problem was. It was in the /includes/modules/order_total/ot_coupon.php

I used Ajeh's modified version of the ot_coupon.php and it fixed the issue.

7 Jun 2013, 2:35 PM
#12
firebug avatar

firebug

New Zenner

Join Date:
Mar 2011
Location:
Georgia
Posts:
26
Plugin Contributions:
0

Post #12 by firebug

firebug:

I figured out what my problem was. It was in the /includes/modules/order_total/ot_coupon.php

I used Ajeh's modified version of the ot_coupon.php and it fixed the issue.

I forgot to mention that I had help from www.Pro-Webs.net figuring all this out.