A plugin framework system for Zencart
It has been over 4 years since I have started working with Zencart and the system still doesn’t have a good system in place to support plugins. There is almost no standard, no rules, plugin/module developers have to place files all over the places, sometimes even overwrite core files and clean un-installation of plugins is too time consuming that it’s never done on most clients’ sites we have seen. After using the system for a while, most stores will be “blessed” with a mess of old and codes all over the place which makes upgrading more difficult than it’s already is.
While we have switched to Zenmagick on some projects (which is a powerful and modern system built on top of new technologies), Zenmagick still needs a few more months to reach its mature state, and also many of our clients are still with Zencart. In the past few weeks I have been working on a mini plugin framework system for Zencart which hopefully will help us make our future works on Zencart much easier and faster, my goals for the system are:
- A Plugin should be able to contain every (or at least 99%) of its files in a single package, which should make un-installation much easier and cleaner.
- Plugin should be be loaded upon request only, so on a page that does not use a certain plugin, no extra files should be loaded.
I could have use Zenmagick for my purpose (Zenmagick was designed so that it could be plugged into Zencart) but I felt that:
- Using Zenmagick for this simple purpose seems like an over-kill
- I wouldn’t have been able to learn at much as I did if I use a solution out of the box like that
This plugin system was aimed to be used internally for our clients’ projects only, but I feel like this can help others as well, in developing modules for their own purposes, and so here it is on git, please feel free to report any issue or fork and develop it: Github
PS: the system lacks documents now, but I will soon add lots of comments into the code itself, and I will also add a test plugin.