As we get close to the Zen Cart 1.5.5 release, I'd like to gather opinions from both developers and users regarding how plugins supporting multiple Zen Cart versions get "packaged".
I've seen a couple of different approaches and, as in life, there are pros and cons associated with each approach:
- User edits. The plugin identifies (in its readme) the change blocks required for any core/template changes. The person performing the plugin installation is responsible for merging that change into their store's files.
- Pro: Simple distribution
- Pro: Code re-use. No change needed to the plugin if no change to the core/template files in a new Zen Cart version.
- Con: When was the last time you read a readme?
- Folder Per Zen Cart Version. The plugin pre-installs its required changes into multiple Zen Cart versions of the file, one per Zen Cart version supported by the plugin. The person performing the installation is responsible for choosing the file version associated with their store's current Zen Cart version and then merging those changes into their store's files.
- Pro: Changes for a given Zen Cart version are pre-integrated.
- Con: Plugin change is required for every supported Zen Cart version.
- Con: Complexity of the installation.
- Files edited to support multiple Zen Cart versions. The plugin pre-includes its required changes into a single version of the file, with conditional statements to enable that version of the file to be used on multiple Zen Cart versions. The person performing the installation is responsible for merging those changes into their store's files.
- Pro: Changes for a given Zen Cart version are pre-integrated.
- Pro: Code re-use. No change needed to the plugin if no change to the core/template files in a new Zen Cart version.
- Con: Potentially changes the underlying processing for older Zen Cart installations.
- Use a Plugin Manager. The plugin includes installation code (like Image Handler 4) that automagically provides the required file updates. The person performing the plugin installation "simply" copies the plugin's files.
- Pro: Easy for the person installing the plugin; no files to merge.
- Pro: Simple installation instructions.
- Con: Installations using "popular" core/template files (think /YOUR_ADMIN/orders.php) can be complicated to the point of failure.
The changes coming in Zen Cart 1.5.5 are revolutionary, with the inclusion of a pre-enabled responsive template on the store-front and significant look-and-feel changes to the admin-console. How do you think that plugins should be packaged going forward? With your response, please indicate whether you're wearing a "developer" or "user" hat.
Bookmarks