Forums / General Questions / Including Gift Vouchers in the Discount Coupon calculation

Including Gift Vouchers in the Discount Coupon calculation

Views: 1,145

Results 1 to 5 of 5
24 Dec 2013, 4:53 PM
#1
gmachlin avatar

gmachlin

New Zenner

Join Date:
Dec 2013
Location:
New York
Posts:
3
Plugin Contributions:
0

Including Gift Vouchers in the Discount Coupon calculation

Currently, Zencart excludes Gift Voucher purchases from the Discount calculated at checkout. Regardless of whether the Coupon has no restrictions or whether the coupon is specifically set up to allow the GV product code in "restrictions" it is still excluded. To clarify, I would like to offer a $100 Gift Voucher for $90. The coupon would only be allowed once per customer. Also GV proceeds could not be used to then purchase an additional GV or someone could easily game the system. I have looked in the Order Total module and have not found any place where the GV is specifically excluded from the calculation. Can someone point me in the right direction?? PS - I am not a developer so please excuse any misuse of terms.

24 Dec 2013, 6:11 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Including Gift Vouchers in the Discount Coupon calculation

This posting by Ajeh (http://www.zen-cart.com/showthread.php?201804-gift-certificates) allows your store to offer discounted gift certificates. I'm not sure if that's exactly what you're looking for, but it's pretty close!

24 Dec 2013, 9:39 PM
#3
gmachlin avatar

gmachlin

New Zenner

Join Date:
Dec 2013
Location:
New York
Posts:
3
Plugin Contributions:
0

Re: Including Gift Vouchers in the Discount Coupon calculation

lat9:

This posting by Ajeh (http://www.zen-cart.com/showthread.php?201804-gift-certificates) allows your store to offer discounted gift certificates. I'm not sure if that's exactly what you're looking for, but it's pretty close!

Thank you so much LAT9 for the prompt response!! I've read that thread and it seems that the code cannot be used when the GV is priced are by attributes, which is how ours is priced, so maybe there is no way to do this?

25 Dec 2013, 12:55 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Including Gift Vouchers in the Discount Coupon calculation

You could customize the function is_product_valid and customize the section for:

    if (preg_match('/^GIFT/', $product->fields['products_model'])) {
      return false;
    }

to allow the particular coupon_id to be validated regardless of the preg_match ...

I would customize this just for the specific coupon_id and not as a regular by pass of this safety ...

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!

26 Dec 2013, 5:25 AM
#5
gmachlin avatar

gmachlin

New Zenner

Join Date:
Dec 2013
Location:
New York
Posts:
3
Plugin Contributions:
0

Re: Including Gift Vouchers in the Discount Coupon calculation

Ajeh:

You could customize the function is_product_valid and customize the section for:

if (preg_match('/^GIFT/', $product->fields['products_model'])) {
  return false;
}
> 
> to allow the particular coupon_id to be validated regardless of the preg_match ...
> 
> I would customize this just for the specific coupon_id and not as a regular by pass of this safety ...

Thanks so much Linda!  I will try that!  Happy Holidays!