About Plugins
From ZenMagick Wiki
Introduction
ZenMagick plugins are, similar to zen-cart modules, a way of separating functionality into smaller, optional blocks. The ZenMagicks plugin architecture is loosely based on modules but are designed to be more generic. That allows plugins to implement a variety of different things without the need for new plugin types.
Plugin Types
Right now three types of plugins supported. All types extend from the same ZMPlugin base class.
- request
- The most general type of plugins. Request plugins typically add new functions or classes which then can be used in templates.
- They also can add new pages (for example the locator).
- init
- Small, single file plugins that extend core functionality; examples are category path setup or additional authentication activities
- admin
- Pure admin plugins. Right now all admin plugins add features to the ZenMagick Catalog Manager.
Use Cases
Plugins may be used to:
- Add configuration options to ZenMagick and zen-cart
- Receive and process zen-cart and ZenMagick events
- Add (side-)boxes with dynamic contents (based on configuration settings)
- Add new pages to the storefront
- Add new admin pages with custom forms
- Replace existing ZenMagick classes to change the default behavior of ZenMagick
- Modify ZenMagick to allow existing zen-cart mods to work in ZenMagick
- Filter the generated HTML (The Google Analytics plugin does that in order to add JavaScript without the need to modify templates!)

