Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Coupon behavior changed between 1.3.8 and 1.5.1?

Coupon behavior changed between 1.3.8 and 1.5.1?

Views: 7,052

Results 1 to 16 of 16
17 Jul 2014, 8:39 AM
#1
daniellek avatar

daniellek

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Coupon behavior changed between 1.3.8 and 1.5.1?

I've just upgraded to 1.5.1 and have problem with coupon:
I'd like to give one particular product for free (normal price for this product is 10.5) when total amount on order is 10 or more.

In 1.3.8 i've been setting coupon like this:
Coupon Amount 10.5
Coupon Minimum Order 20.5
and restrictions:
deny for all categories
allow for product that should go free.

In 1.5.1 the same setup doesn't work - I get error "You must spend at least 20.50 to redeem this coupon"

What's interesting, when I add this product 2 times to cart, I can use this coupon:
It looks like "Coupon minimum order" works not for whole order, but just for products which match 'restrictions'.

How can I add such coupon in 1.5.1?

17 Jul 2014, 8:54 AM
#2
daniellek avatar

daniellek

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

daniellek:

I'd like to give one particular product for free (normal price for this product is 10.5) when total amount on order is 10 or more.

Just to be clear:
I'd like to give one particular product for free (normal price for this product is 10.5) when total amount on order for other products is 10 or more.

17 Jul 2014, 6:40 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

You might be able to use the file:
/includes/modules/order_total/ot_coupon.php

from Zen Cart v153 and adapt the changes from the post on:
http://www.zen-cart.com/showthread.php?209936-If-category-spend-is-X-discount-of-y-on-entire-order&highlight=Discount+Coupon*

from post #11 ...

What those changes do it make the minimum amount based on the Order Total rather than the Total of the Qualifying Product(s) ...

That might be the changes that you need for this ...

NOTE: In the up coming v1.6, this will be done on a per coupon basis for the minimum to be based on Order Total or on Qualifying Product(s) Total ...

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!

20 Jul 2014, 1:08 PM
#4
daniellek avatar

daniellek

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

I've tried that with v.1.5.1 file and it didn't work as expected.
I'll try to upgrade to 1.5.3 and check it again.
Thx!

20 Aug 2014, 4:32 PM
#5
daniellek avatar

daniellek

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Hi, I'm back :)

I've upgraded to 1.5.3 and made changes to ot_coupon.php.

Now shop says "Congratulations you have redeemed the Discount Coupon", but doesn't substract from order value.
There's something missing to make it work. Any ideas?

UPDATE: it works! I've made changes in one place instead of two - thank you very much!

20 Aug 2014, 5:16 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Thanks for the update that this is now working for you ... :smile:

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!

20 Aug 2014, 5:36 PM
#7
daniellek avatar

daniellek

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

I can work on a patch to get it configurable via admin interface. Interested?

20 Aug 2014, 6:38 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

It could be handy for others ...

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!

18 Feb 2015, 11:05 AM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

G'day Ajeh,

I realise that this is an old thread, but it appears to be the most current one that pertains to a small issue that has just been brought to my attention.

Ajeh:

You might be able to use the file:
/includes/modules/order_total/ot_coupon.php
<snip>
What those changes do it make the minimum amount based on the Order Total rather than the Total of the Qualifying Product(s) ...
<snip>
NOTE: In the up coming v1.6, this will be done on a per coupon basis for the minimum to be based on Order Total or on Qualifying Product(s) Total ...

One of my clients has recently observed that if there are no discount eligible products in the cart (due to category/product restrictions) the 'error' message produced is along the lines of 'You must spend a minimum of $x.xx (often $0,00 if no minimum has been set) to redeem this coupon' and if there are other products in the cart this can cause customer confusion (after all, they can easily see that the cart value is more than the '$x.xx' indicated.

After looking at the code I noted that the minimum spend check is the first one performed and if/when it fails the test the customer is redirected back to the checkout page.

What I did to avoid the misleading "You must spend a minimum of $x.xx" message was to re-organise the validity tests so that the order value test is the last check performed. The result being that the customers now see "THIS COUPON CODE IS NOT VALID FOR ANY PRODUCT CURRENTLY IN YOUR CART", which is far less confusing for the customer.

Furthermore (and this is the sole reason for this post) is that with the default code performing the value tests first it means that that this more accurate error (not valid for any product in the cart) response will never be invoked, and should therefore be considered a bug.

I've no idea how long this bug has been in existence (not really important IMO). The site in question is currently using V1.5.4.

I'll leave it for you to decide if the problem is 'important' enough to fix in a future update (or not). :)

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

18 Feb 2015, 3:29 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

This is fixed in v1.6 ...

I have not tried to backport it to v1.5.4, as it contains numerous other features that would get complicated ...

I will try to look at this when I have some free time ...

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!

18 Feb 2015, 3:36 PM
#11
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Ajeh:

I will try to look at this when I have some free time ...

What's this thing called 'free time' that you mention? Is it a free download? If not, where can I buy some? :-)

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

18 Feb 2015, 4:02 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

I have been looking for a coupon for Free Time for a long while ... not yet located one ...: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!

18 Feb 2015, 4:40 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

A temporary fix would be to change line 190 in the file:
/includes/modules/order_total/ot_coupon.php

// 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['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
[B]        if ($coupon_result->fields['coupon_minimum_order'] > 0 && strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
[/B]
          $messageStack->add_session('redemptions', sprintf(TEXT_INVALID_REDEEM_COUPON_MINIMUM, $currencies->format($coupon_result->fields['coupon_minimum_order'])),'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));

Which will skip that message if the coupon Minimum is not set and show the message for nothing qualified ...

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!

18 Feb 2015, 5:07 PM
#14
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Ajeh:

Which will skip that message if the coupon Minimum is not set and show the message for nothing qualified ...

That is only a part of the solution though. What about the case where a coupon minimum is set (say for $100.00) but there are no products in the cart eligible for the discount (for example, when the coupon is also restricted by product or category), but the cart also contains other products to the value of (say) $200.00

In this case the customer is going to be given a message like 'You must spend a minimum of $100.00 to redeem this coupon" rather than the more accurate response of "THIS COUPON CODE IS NOT VALID FOR ANY PRODUCT CURRENTLY IN YOUR CART".

Also, I think I owe you an apology, I wasn't really asking you for a solution (I already have one that appears to work). I was merely trying to explain the issue.

FWIW though, this is how I took care of it.

function collect_posts() {
    global $db, $currencies, $messageStack, $order;
    global $discount_coupon;
    // remove discount coupon by request
    if (isset($_POST['dc_redeem_code']) && strtoupper($_POST['dc_redeem_code']) == 'REMOVE') {
      unset($_POST['dc_redeem_code']);
      unset($_SESSION['cc_id']);
      $messageStack->add_session('checkout_payment', TEXT_REMOVE_REDEEM_COUPON, 'caution');
    }
//    print_r($_SESSION);
    // bof: Discount Coupon zoned always validate coupon for payment address changes
    // eof: Discount Coupon zoned always validate coupon for payment address changes
    if ((isset($_POST['dc_redeem_code']) && $_POST['dc_redeem_code'] != '') || (isset($discount_coupon->fields['coupon_code']) && $discount_coupon->fields['coupon_code'] != '')) {
      // set current Discount Coupon based on current or existing
      if (isset($_POST['dc_redeem_code']) && $discount_coupon->fields['coupon_code'] == '') {
        $dc_check = $_POST['dc_redeem_code'];
      } else {
        $dc_check = $discount_coupon->fields['coupon_code'];
      }






      $sql = "select coupon_id, coupon_amount, coupon_type, coupon_minimum_order, uses_per_coupon, uses_per_user,
              restrict_to_products, restrict_to_categories, coupon_zone_restriction
              from " . TABLE_COUPONS . "
              where coupon_code= :couponCodeEntered
              and coupon_active='Y'
              and coupon_type !='G'";


      $sql = $db->bindVars($sql, ':couponCodeEntered', $dc_check, 'string');


      $coupon_result=$db->Execute($sql);


      if ($coupon_result->fields['coupon_type'] != 'G') {


        if ($coupon_result->RecordCount() < 1 ) {
          $messageStack->add_session('redemptions', TEXT_INVALID_REDEEM_COUPON,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
        }
        $order_total = $this->get_order_total($coupon_result->fields['coupon_id']);


// left for total order amount vs qualified order amount just switch the commented lines
//        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
//        if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
//
//          $messageStack->add_session('redemptions', sprintf(TEXT_INVALID_REDEEM_COUPON_MINIMUM, $currencies->format($coupon_result->fields['coupon_minimum_order'])),'caution');
//          $this->clear_posts();
//          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
//        }


        // JTD - added missing code here to handle coupon product restrictions
        // look through the items in the cart to see if this coupon is valid for any item in the cart
        $products = $_SESSION['cart']->get_products();
        $foundvalid = true;


        if ($foundvalid == true) {
          $foundvalid = false;
          for ($i=0; $i<sizeof($products); $i++) {
            if (is_product_valid($products[$i]['id'], $coupon_result->fields['coupon_id'])) {
              $foundvalid = true;
              continue;
            }
          }
        }


        if (!$foundvalid) {
          $this->clear_posts();
        }


        if (!$foundvalid) zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'credit_class_error_code=' . $this->code . '&credit_class_error=' . urlencode(TEXT_INVALID_COUPON_PRODUCT . ' ' . $dc_check), 'SSL',true, false));
        // JTD - end of additions of missing code to handle coupon product restrictions


        $date_query=$db->Execute("select coupon_start_date from " . TABLE_COUPONS . "
                                  where coupon_start_date <= now() and
                                  coupon_code='" . zen_db_prepare_input($dc_check) . "'");


        if ($date_query->RecordCount() < 1 ) {
          $messageStack->add_session('redemptions', TEXT_INVALID_STARTDATE_COUPON,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }


        $date_query=$db->Execute("select coupon_expire_date from " . TABLE_COUPONS . "
                                  where coupon_expire_date >= now() and
                                  coupon_code='" . zen_db_prepare_input($dc_check) . "'");


        if ($date_query->RecordCount() < 1 ) {
          $messageStack->add_session('redemptions', TEXT_INVALID_FINISHDATE_COUPON,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }


        $coupon_count = $db->Execute("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . "
                                      where coupon_id = '" . (int)$coupon_result->fields['coupon_id']."'");


        $coupon_count_customer = $db->Execute("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . "
                                               where coupon_id = '" . $coupon_result->fields['coupon_id']."' and
                                               customer_id = '" . (int)$_SESSION['customer_id'] . "'");


        if ($coupon_count->RecordCount() >= $coupon_result->fields['uses_per_coupon'] && $coupon_result->fields['uses_per_coupon'] > 0) {
          $messageStack->add_session('redemptions', TEXT_INVALID_USES_COUPON . $coupon_result->fields['uses_per_coupon'] . TIMES ,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }


        if ($coupon_count_customer->RecordCount() >= $coupon_result->fields['uses_per_user'] && $coupon_result->fields['uses_per_user'] > 0) {
          $messageStack->add_session('redemptions', sprintf(TEXT_INVALID_USES_USER_COUPON, $dc_check) . $coupon_result->fields['uses_per_user'] . ($coupon_result->fields['uses_per_user'] == 1 ? TIME : TIMES) ,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }


        $_SESSION['cc_id'] = $coupon_result->fields['coupon_id'];
        if ($_SESSION['cc_id'] > 0) {
          $sql = "select coupon_id, coupon_amount, coupon_type, coupon_minimum_order, uses_per_coupon, uses_per_user,
                  restrict_to_products, restrict_to_categories, coupon_zone_restriction, coupon_code
                  from " . TABLE_COUPONS . "
                  where coupon_id= :couponIDEntered
                  and coupon_active='Y'";
          $sql = $db->bindVars($sql, ':couponIDEntered', $_SESSION['cc_id'], 'string');


          $coupon_result=$db->Execute($sql);


          $foundvalid = true;


          $check_flag = false;


          // base restrictions zone restrictions for Delivery or Billing address
          switch($coupon_result->fields['coupon_type']) {
            case 'S': // shipping
              // use delivery address
              $check_zone_country_id = $order->delivery['country']['id'];
              break;
            case 'F': // amount
              // use billing address
              $check_zone_country_id = $order->billing['country']['id'];
              break;
            case 'O': // amount off and free shipping
              // use delivery address
              $check_zone_country_id = $order->delivery['country']['id'];
              break;
            case 'P': // percentage
              // use billing address
              $check_zone_country_id = $order->billing['country']['id'];
              break;
            case 'E': // percentage and Free Shipping
              // use delivery address
              $check_zone_country_id = $order->delivery['country']['id'];
              break;
            default:
              // use billing address
              $check_zone_country_id = $order->billing['country']['id'];
              break;
          }


//          $sql = "select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $coupon_result->fields['coupon_zone_restriction'] . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id";
          $sql = "select zone_id, zone_country_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $coupon_result->fields['coupon_zone_restriction'] . "' and zone_country_id = '" . $check_zone_country_id . "' order by zone_id";
          $check = $db->Execute($sql);


          // base restrictions zone restrictions for Delivery or Billing address
          switch($coupon_result->fields['coupon_type']) {
            case 'S': // shipping
              // use delivery address
              $check_zone_id = $order->delivery['zone_id'];
              break;
            case 'F': // amount
              // use billing address
              $check_zone_id = $order->billing['zone_id'];
              break;
            case 'O': // amount off and free shipping
              // use delivery address
              $check_zone_id = $order->delivery['zone_id'];
              break;
            case 'P': // percentage
              // use billing address
              $check_zone_id = $order->billing['zone_id'];
              break;
            case 'E': // percentage and free shipping
              // use delivery address
              $check_zone_id = $order->delivery['zone_id'];
              break;
            default:
              // use billing address
              $check_zone_id = $order->billing['zone_id'];
              break;
          }


          if ($coupon_result->fields['coupon_zone_restriction'] > 0) {
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
//              } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
              } elseif ($check->fields['zone_id'] == $check_zone_id) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
            $foundvalid = $check_flag;
          }
          // remove if fails address validation
          if (!$foundvalid) {
            $messageStack->add_session('checkout_payment', TEXT_REMOVE_REDEEM_COUPON_ZONE, 'caution');
            $this->clear_posts();
            if (!$foundvalid) zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
          } else {
          //      if ($_POST['submit_redeem_coupon_x'] && !$_POST['gv_redeem_code']) zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'credit_class_error_code=' . $this->code . '&credit_class_error=' . urlencode(TEST_NO_REDEEM_CODE), 'SSL', true, false));
            $messageStack->add('checkout', TEXT_VALID_COUPON,'success');
          }
        }
      } else {
        $messageStack->add_session('redemptions', TEXT_INVALID_REDEEM_COUPON,'caution');
        $this->clear_posts();
        zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
      }


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


          $messageStack->add_session('redemptions', sprintf(TEXT_INVALID_REDEEM_COUPON_MINIMUM, $currencies->format($coupon_result->fields['coupon_minimum_order'])),'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL',true, false));
        }
  } 


 

I commented out the code in RED, and pasted a copy of it as the BLUE.

I'm not saying this is the best solution, just an easy one that appears to work with no side effects (that I'm aware of).

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

18 Feb 2015, 5:35 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Missed that one ...

v1.6 is smarter ...

If there are no qualifying Products in the cart and a minimum is set the message would be:

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

Plus there is a link to the Discount Coupon information in a popup link ...

If there is a qualifying Product in the cart with other Products that made the minimum, but were not qualifying Products the message would be:

You must spend at least $75.00 to redeem this coupon

Plus there is a link to the Discount Coupon information in a popup link ...

I have not tried your fix for v1.5.4, but so far it looks pretty good ... another when some Free Time, I will try to play with it and break ... er ... test it ... :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!

19 Feb 2015, 6:38 PM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Coupon behavior changed between 1.3.8 and 1.5.1?

Ajeh:

Missed that one ...

If there are no qualifying Products in the cart and a minimum is set the message would be:

Plus there is a link to the Discount Coupon information in a popup link ...

If there is a qualifying Product in the cart with other Products that made the minimum, but were not qualifying Products the message would be:

Plus there is a link to the Discount Coupon information in a popup link ...

I have not tried your fix for v1.5.4, but so far it looks pretty good ... another when some Free Time, I will try to play with it and break ... er ... test it ... :cool:

Yup, those are the messages I'm getting under those conditions with the changes I made :)

I'm not getting links for the popups though. Possibly because this site is using the COWOA mod (just guessing).

None of my other clients have reported this as being an issue/bug (probably because they either don't use Coupons, or if they do, they haven't applied any category/product limits (plus the fact that few customers would bother to report the problem if/when they work the way around it).

In short, it probably isn't worth spending any time with it on the currently affected versions (which could, in theory go way back to V1.3.x) and this thread could suffice for the few that do experience the problem).

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.