Zen Cart Rule #3: Don’t Over-Prepare

 hints, php, troubleshoot, zen-cart  Comments Off on Zen Cart Rule #3: Don’t Over-Prepare
Oct 312015
 

When you’re performing database manipulations, it’s important to prepare your textual input so that there aren’t any stray single- (‘) or double-quotes  (“) that will wreck havoc with your MySQL queries.  Zen Cart provides methods (the functions zen_db_input and $db->prepare_input) that will help, but you need to have a plan for what method you’re going […]

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 […]

Zen Cart v1.5.3: Auto-loaded Observers!

 php, plugins, v1.5.3, zen-cart  Comments Off on Zen Cart v1.5.3: Auto-loaded Observers!
Aug 312014
 

One of the features quietly introduced in Zen Cart v1.5.3 is auto-loaded observers.  If you’re developing a plugin that uses an observer-class, you normally have to provide two files in your plugin’s distribution to get that class loaded and instantiated: /includes/auto_loaders/config.your_plugin.php /includes/classes/observers/class.your_plugin.php Starting with Zen Cart v1.5.3, built-in functionality will do the “heavy lifting” to […]