Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Discounts/Coupons, Gift Certificates, Newsletters, Ads / If category spend is X, discount of y% on entire order

If category spend is X, discount of y% on entire order

Started by farrel on 6 Sep 2013, 9:03 AM · Views: 4,281

Results 1 to 11 of 11
6 Sep 2013, 9:03 AM
#1
farrel avatar

farrel

New Zenner

Join Date:
Nov 2012
Posts:
28
Plugin Contributions:
0

Post #1 by farrel

Hi
I am trying to promote a particular category.
I would like to set up a coupon so that if a customer spends over $50 (in two of my 5 categories) then they can get a discount of 10% on entire order (regardless of which other categories they purchase from).

Any help appreciated.

6 Sep 2013, 9:29 AM
#2
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Post #2 by gilby

farrel:

Hi
I am trying to promote a particular category.
I would like to set up a coupon so that if a customer spends over $50 (in two of my 5 categories) then they can get a discount of 10% on entire order (regardless of which other categories they purchase from).

Any help appreciated.Clarification please..
$50 total from the 2 categories
or $50 in Both of the 2 categories ($100 over the 2 categories)

6 Sep 2013, 10:14 AM
#3
farrel avatar

farrel

New Zenner

Join Date:
Nov 2012
Posts:
28
Plugin Contributions:
0

Post #3 by farrel

gilby:

Clarification please..
$50 total from the 2 categories
or $50 in Both of the 2 categories ($100 over the 2 categories)

If spend is over $50 in either or both combined.

The following would qualify for 10% of whole order:
a) Over $50 in category A, $0 category B = total >$50
b) Over $50 in category B, $0 category A = total >$50
c) $30 in category A, $25 category B = total >$50

in scenarios a, b and c above any spend in category C,D and E would also qualify for 10% discount.

Thanks

7 Sep 2013, 4:26 AM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

This is actually not as hard as you think ...

Make your Discount Coupon with the settings for
Amount of: 10%
Minimum: 50.00

Next, go to the Restrictions ...

Set Top Category to DENY

Then, below select the first Category and in the drop down for Product pick All Products in this Category ALLOW
Then, below select the second Category and in the drop down for Product pick All Products in this Category ALLOW

Now, only the Products that actually selected, those in the two Categories, can be used to make up the Minimum of 50.00 ...

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!

7 Sep 2013, 4:33 AM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

Oops ... I may have stretched that a bit ... it will work for just the restricted Products qualifying for 10% off ...

But, you then said now to qualify all Products because you have the initial $50.00 of qualifying Products to extend the 10% discount ... is that correct?

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!

7 Sep 2013, 6:55 PM
#6
farrel avatar

farrel

New Zenner

Join Date:
Nov 2012
Posts:
28
Plugin Contributions:
0

Post #6 by farrel

Ajeh:

Oops ... I may have stretched that a bit ... it will work for just the restricted Products qualifying for 10% off ...

But, you then said now to qualify all Products because you have the initial $50.00 of qualifying Products to extend the 10% discount ... is that correct?

Hi. Thanks.
Yes this is correct. I had tried what you suggested but it only applies discount to the qualifying category and not the whole order.

8 Sep 2013, 3:27 AM
#7
ajeh avatar

ajeh

Oba-san

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

Post #7 by ajeh

Somewhere on the forum I think I already posted the code for this for v1.3.9h ... where exactly, escapes me at the moment ...

And the code something similar to this but also on a per Discount Coupon basis should be built into the upcoming v1.6 but that is still a ways away ...

I will try to find that code some place on the forum if I get time ... meanwhile you might try searching for it for either v1.3.9h or v1.5 or v1.5.1 as I may also have posted it for all of those ...

So much code and so little grey cells left to remember where I posted it all ... :lookaroun

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!

9 Sep 2013, 9:52 AM
#8
farrel avatar

farrel

New Zenner

Join Date:
Nov 2012
Posts:
28
Plugin Contributions:
0

Post #8 by farrel

Ajeh:

Somewhere on the forum I think I already posted the code for this for v1.3.9h ... where exactly, escapes me at the moment ...

And the code something similar to this but also on a per Discount Coupon basis should be built into the upcoming v1.6 but that is still a ways away ...

I will try to find that code some place on the forum if I get time ... meanwhile you might try searching for it for either v1.3.9h or v1.5 or v1.5.1 as I may also have posted it for all of those ...

So much code and so little grey cells left to remember where I posted it all ... :lookaroun
Thanks Ajeh
I have tried some advanced search with your name and discount and coupon. No Luck. Any suggestions on other key words to try?
Thanks

9 Sep 2013, 8:26 PM
#9
ajeh avatar

ajeh

Oba-san

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

Post #9 by ajeh

No I tried it too ... so I am trying to get some time to go through a bazzillion zips that I have of various things I posted that I can go check if they don't have all that you need to do this in v1.3.9h that I can then re-post for you ... it just might take some time for me to find it ...

Sorry to leave you hanging on this until I do have the time and then can test the fix ...

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!

10 Sep 2013, 5:30 PM
#10
farrel avatar

farrel

New Zenner

Join Date:
Nov 2012
Posts:
28
Plugin Contributions:
0

Post #10 by farrel

Ajeh:

No I tried it too ... so I am trying to get some time to go through a bazzillion zips that I have of various things I posted that I can go check if they don't have all that you need to do this in v1.3.9h that I can then re-post for you ... it just might take some time for me to find it ...

Sorry to leave you hanging on this until I do have the time and then can test the fix ...

Thanks Ajeh

Very much appreciated!

24 Sep 2013, 2:20 AM
#11
ajeh avatar

ajeh

Oba-san

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

Post #11 by ajeh

Try this ...

There are two lines in the file:
/includes/modules/order_total/ot_coupon.php

where it reads:

// left for total order amount vs qualified order amount just switch the commented lines

The two lines below each of those comments has one of the lines commented out ...

Switch which line is commented out, example:

// left for total order amount vs qualified order amount just switch the commented lines
[B]//[/B]        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
        if (strval($order_total['total']) < $coupon_result->fields['coupon_minimum_order']) {

change to:

// left for total order amount vs qualified order amount just switch the commented lines
        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
[B]//[/B]        if (strval($order_total['total']) < $coupon_result->fields['coupon_minimum_order']) {

then load that file to the server and see if it changes the Discount Coupon to work the way you are wanting it to ...

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!