Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / One coupon, different categories, different discounts

One coupon, different categories, different discounts

Locked

Views: 2,171

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
15 Nov 2007, 8:45 AM
#1
texas_ian avatar

texas_ian

New Zenner

Join Date:
Oct 2007
Posts:
11
Plugin Contributions:
0

One coupon, different categories, different discounts

Hi guys,

I've a question about coupons that I've not seen answered anywhere else, hopefully someone can give me a definitive answer.

Is it possible to create a single coupon that will give a 10% discount on products in one category, but a 15% discount for products in the other categories of my site?

I have an online jewellery site and I'd like to discount 10% off luxury products, but 15% off the standard ones.

Any help gratefully appreciated.

Thanks,
Ian

15 Nov 2007, 10:11 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: One coupon, different categories, different discounts

It's a nice idea, but unfortunately the current structure of coupons restricts them to a single rate. It would take a lot of custom code to change this.

15 Nov 2007, 11:53 AM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: One coupon, different categories, different discounts

Should you wish to consider undertaking that custom programming, it is likely that it can all be shoehorned into a small area of your Zen cart code. I believe that you would need only to re-write the calculate_deductions function in the ot_coupon module - though that would require some reasonably good knowledge of Zen Cart (or at least coupons, payment calculations generally and the $_SESSION['cart'] array).

15 Nov 2007, 1:29 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

Re: One coupon, different categories, different discounts

Good grief!! Create two coupons and move on with your life. I would strongly recommend NOT attempting to modify the coupon logic.

15 Nov 2007, 7:20 PM
#5
texas_ian avatar

texas_ian

New Zenner

Join Date:
Oct 2007
Posts:
11
Plugin Contributions:
0

Re: One coupon, different categories, different discounts

swguy:

Good grief!!

That's a bit harsh! Two coupons doesn't really address my requirements, however thanks to kuroi I at least know I'm not missing something.

Being an ASP / MSSQL man by trade I don't think I'll be adapting the coupons module to get this functionality, it's a nice thought though.

Thanks kuroi for your responses.