Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Customer Discount Code for free gift with purchase

Customer Discount Code for free gift with purchase

Views: 1,244

Results 1 to 6 of 6
01 Dec 2011, 23:19
#1
jnb41578 avatar

jnb41578

New Zenner

Join Date:
Jul 2011
Posts:
72
Plugin Contributions:
0

Customer Discount Code for free gift with purchase

I have been fiddling around with the coupon restrictions to allow a free gift with minimum purchase.

This is how I have it set up in the admin menu:

And this is what I get at checkout, and yes the free item is in my cart.

If anyone can please help me to let me know what I might be doing wrong I would appreciate it!

Thank you!

03 Dec 2011, 18:18
#2
jnb41578 avatar

jnb41578

New Zenner

Join Date:
Jul 2011
Posts:
72
Plugin Contributions:
0

Re: Customer Discount Code for free gift with purchase

Can nobody really help me with this?

04 Dec 2011, 15:11
#3
ajeh avatar

ajeh

Oba-san

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

Re: Customer Discount Code for free gift with purchase

This should be working in v1.5 ...

07 Dec 2011, 04:37
#4
ajeh avatar

ajeh

Oba-san

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

Re: Customer Discount Code for free gift with purchase

Try editing the file:
/includes/modules/order_total/ot_coupon.php

and look for the two sections marked as:

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

Beneath them, you will see two lines, example:

//        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
        if (strval($order_total['total']) < $coupon_result->fields['coupon_minimum_order']) {

Notice how the first line is commented out ... switch the comments to the second line so they read:

        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
//        if (strval($order_total['total']) < $coupon_result->fields['coupon_minimum_order']) {

And the second set of lines:

//        if ($orderTotalDetails['totalFull'] >= $coupon->fields['coupon_minimum_order']) {
        if (strval($orderTotalDetails['total']) >= $coupon->fields['coupon_minimum_order']) {

switch to:

        if ($orderTotalDetails['totalFull'] >= $coupon->fields['coupon_minimum_order']) {
//        if (strval($orderTotalDetails['total']) >= $coupon->fields['coupon_minimum_order']) {

Now say the free gift is a Product that is $29.99 with a minimum purchase of $100.00 ...

Make the minimum Purchase $129.99 ...

See if that works for you ...

07 Dec 2011, 19:09
#5
jnb41578 avatar

jnb41578

New Zenner

Join Date:
Jul 2011
Posts:
72
Plugin Contributions:
0

Re: Customer Discount Code for free gift with purchase

Thank you Thank you Thank you! Doing the happy dance, you are awesome, thank you so much for taking the time to help me! :hug:

07 Dec 2011, 19:17
#6
ajeh avatar

ajeh

Oba-san

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

Re: Customer Discount Code for free gift with purchase

You are most welcome ... thanks for the update that this worked for you ... :smile: