Automatic Coupon Creation in Zen Cart

At the tail end of National Coupon Month, I am pleased to announce the limited availability of two automatic coupon generation solutions for Zen Cart:  Spender AutoCoupon and Chooser AutoCoupon.  Spender AutoCoupon allows coupons to be automatically generated on the basis of total purchase amount; Chooser AutoCoupon allows coupons to be automatically generated on the basis of items purchased.   They use the syntax from Big Spender and  Big Chooser respectively.  These solutions are ready for use in Zen Cart version 1.3.7.1 and 1.3.8a.

Zen Cart Big Chooser Bug Detected

A bug has been detected in all versions of my Zen Cart Big Chooser extension.

The issue was as follows:

  • For set_constraint() parameters with multiple required purchases, passing was based on whether the final required quantity passed. So if you used
    $this->set_constraint(CAT, 3, 6, CAT, 2, 5);

    and you had 5 category 2 items but less than 6 category 3 items, the constraint would be considered passed.   (Note: If your set_constraint() parameters have only one required purchase, you are not affected by this bug.)

  • For set_choice_constraint() parameters, if you had multiple instances of  set_choice_constraint, passing was based on whether the last one passed. So if you had
    $this->set_choice_constraint(6, CAT, 2);
    $this->set_choice_constraint(6, CAT, 3);

    and you did not have 6 category 2 items but you did have 6 category 3 items, the constraint would be considered passed. (Note: If your choice constraints are consolidated into one single set_choice_constraint parameter, you are not affected by this bug.)

This is the resolution. Edit the file includes/modules/order_total/ot_big_chooser.php, and in the function calculate_deductions() find this block of code:

// If there's a constraint list, make sure the product is in it.

if (sizeof($rule->constraintlist) > 0) {

     $pass = false;

     foreach ($rule->constraintlist as $constraint) {

        $pass = $this->check_cart_constraint($products, $constraint);

     }

     if (!$pass) continue;

}

// If there's a choice constraint list, make sure it's covered.

if (sizeof($rule->choice_constraintlist) > 0) {

     $pass = false;

     foreach ($rule->choice_constraintlist as $constraint) {

        $pass = $this->check_cart_choice_constraint($products, $constraint);

     }

     if (!$pass) continue;

}

Replace it with this block of code:

// If there's a constraint list, make sure the product is in it.

if (sizeof($rule->constraintlist) > 0) {

     $pass = false;

     foreach ($rule->constraintlist as $constraint) {

        $pass = $this->check_cart_constraint($products, $constraint);

        if (!$pass) break;

     }

     if (!$pass) continue;

}

// If there's a choice constraint list, make sure it's covered.

if (sizeof($rule->choice_constraintlist) > 0) {

     $pass = false;

     foreach ($rule->choice_constraintlist as $constraint) {

        $pass = $this->check_cart_choice_constraint($products, $constraint);

        if (!$pass) break;

     }

     if (!$pass) continue;

}

This bug is fixed in Big Chooser version 1.2.0a.  If you already have Big Chooser, I can send you a fresh copy with this fix (and selection by manufacturer) for just $10.

Better Together 2.0 Released!

Better Together 2.0 is now available. The new features in this version are:

  • The addition of add_cat_to_prod linkages.
  • Automatic cart sort by price. This means that discounts which use add_cat_to_cat, add_prod_to_cat or add_cat_to_cat will automatically discount the least expensive item that matches the second id.

Related changes to other parts of the Better Together family:

  • Users of the Better Together Admin Panel will require version 2.0 of that software to create add_cat_to_prod linkages; the upgrade fee is $10. Prior versions will continue to work but will be unable to create add_cat_to_prod linkages.
  • Users of the Buy Both Now will require version 2.0 of that software to create add_cat_to_prod linkages; the upgrade fee is $10. Prior versions will continue to work but will be unable to create add_cat_to_prod linkages.
  • Users of the Better Together Promotional Page must download a new copy from my site here.
  • Users of Discount Preview and Checkout Candy do not require any additional changes.

Mixed messages?

A wise man once advised  t-shirt vendors to use attractive female models, not the hoagie-loving dudes who actually wear the shirts.   This was a funny line, but is it truly good advice?   GrokDotCom’s Anthony Garcia says that seeing female models when he selected Men’s 2XL as his size  led to a confusing user experience.

“I would be interested to see what the bounce/exit rate would be on this page. I would bet a lot more than $50 that Threadless.com is bleeding guys on this listing page. I wonder how many guys are thinking they are in the wrong place.”

Perhaps a single size and gender appropriate model (even if CGI) followed by the usual community contributed photographs  would be a better compromise.

Tackling the pile of stars

I use GMail’s “star” feature Star as a giant honking todo list, and I’m pleased to say that this weekend, I’m down to 54 starred items.  “Inbox Zero” should be “Starred Zero” for me. 🙂

I enjoy using Remember the Milk (in fact, I just downloaded the BlackBerry client, which is called MilkSync), but for email that takes time to process, starring can’t be beat.