April 26, 2007

diversions

Filed under: ZenMagick — DerManoMann @ 12:48 am

Work on the new release is progressing quite well. Still, as with the previous releases, it will include stuff I didn’t plan and didn’t even knew would ever be part of ZenMagick in the first place!The main driving factor for this, I guess, is that I am using ZenMagick to run the ZenMagick website. Everything I want to do there needs to be possible with zen-cart, or mostly, ZenMagick.

So currently I find myself working on a plugin architecture that will be (mostly) compatible with zen-cart modules, but still be generic enough to support a wider range of uses.

The main idea is to have a common base class for al plugins. Classes extending from ZMPlugin can actually be dropped in any of zen-carts payment, shipping or order_total directories and will work straight away!

The class includes automatic support to enable/disable the plugin/module and a sort order field.

Plugins may be a single PHP file or a directory containing multiple files to make shipping them easier.

So much as a teaser for now. The reason I would need this is that it would be nice to be able for mods to be able to be installed/uninstalled in a more convenient way than running custom SQL code (and quite a few mods do not support uninstall as noted before). So, it will be easy ot wrap mods I would like to use in a plugin class and have install/uninstall and configuration right away!

Iin the long run plugins may register themself as event listener to zen-cart and/or ZenMagick events (if it comes to that). And should I find a way to easily plug them into the zen-cart modules management, they could be payments, etc. as well.

Other goodies will be (once I get over my distractions, that is):

  • support for POST request handling
  • a new ZMSession class to wrap access to $_SESSION
  •  more simplifications to the validation code
  • more major class/package refactoring :)
  • extensions to messages to be able to attach tehm to particular form fields
  • perhaps more diversion :)

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.