Zen Cart Rule #1: Shipping Module Names

 hints, php, troubleshoot, zen-cart  Comments Off on Zen Cart Rule #1: Shipping Module Names
Aug 282015
 

There are rules everywhere.  In the kitchen, my #1 rule is “Never try to catch a falling knife“; it apparently applies to investments, too!  In Zen Cart, my current #1 rule (having spent an inordinate amount of time debugging its misuse) is “Never use an underscore (_) in a shipping module’s name“.


A shipping module (unlike a payment or order-total module) can have multiple methods that it supports, so the built-in Zen Cart processing uses an underscore (_) to record both the Shipping Module and Shipping Method chosen for an order as a single string value.  For example, using Zen Cart v1.5.4, the Store Pickup shipping module supports multiple stores.  When the customer chooses the first store location, the id associated to the shipping selection is storepickup_storepickup0.

Once the shipping selection is made, the Zen Cart processing maps that selection back to the Store Pickup module (storepickup.php) and its storepickup0 method by splitting (via the PHP explode function) that id value at the (presumed single) underscore.  If there’s an underscore in the shipping module’s name, the association between the shipping module and selected method can never be resolved so the customer is always redirected back to the checkout_shipping page (with no message).


Repeat after me:  I will never (again) use an underscore in a shipping module’s name.

Drop-down Attributes Stop Working After Installing AIS

 plugins, troubleshoot, zen-cart  Comments Off on Drop-down Attributes Stop Working After Installing AIS
Mar 152015
 

If your normal drop-down (a.k.a select-type) attributes stop working after installing my Attribute Image Swatch plugin, then your site’s been the victim of an improperly-coded plugin’s installation SQL script.  This issue has been “known” for a couple of years, with swguy posting this in April of 2012.

I’ll be updating AIS real-soon-now to pro-actively re-insert the missing configuration items if they are not found in your store’s database.  The base Zen Cart install started, as of ZC 1.5.3, creating the problematic configuration items as hidden items within the “Modules” configuration group to circumvent problems in the future.

Update (2015-03-16): Attribute Image Swatch v1.1.4 has been released, including the above change.

Zen Cart v1.5.4 Released!

 plugins, v1.5.4, zen-cart  Comments Off on Zen Cart v1.5.4 Released!
Jan 012015
 

Zen Cart v1.5.4 was released yesterday, primarily containing bugfixes and performance improvements over and above Zen Cart v1.5.3; this version (like v1.5.0) is PCI-compliant.

One change of note is the addition of an admin function: zen_record_admin_activity.  This function is now widely used within the various Zen Cart admin modules, especially in the (ever popular) /YOUR_ADMIN/orders.php.  I’ve developed a backward-compatibility script that any Zen Cart plugin author can use; this script enables authors to upgrade their admin-level core-file overwrites to use the Zen Cart v1.5.4 version without the need for Zen Cart version-specific instructions in their installations.  This script (two files) is posted here on the Zen Cart forums.

At this time, all of my Zen Cart plugins (both free and commerical) have either been updated or verified to operate with Zen Cart v1.5.4!