The main developer interface for Zone Based Shipping is the Plugin Architecture. Many components of Zone Based Shipping are built about a standardised plugin architecture, similar to that used throughout the Magic Data family of addons and Universal Content Puller.
This enables Zone Based Shipping to be extended through the provision of plugin classes, both through other packages and through model classes placed in the site root /models/ directory. See Plugin Architecture for details.
Site Configuration Settings
Zone Based Shipping responds to the following constants when defined in config/site.php.
- ZBS_CALCULATION_PRECISION - the maximum number of decimal places used internally for calculation. Defaults to 6.
- ZBS_RUN_WITHOUT_CORE_COMMERCE - enables ZBS to install without eCommerce. Of use for demonstration sites.
- ZBS_DASHBOARD_DEVELOPMENT_DIAG - extends the diagnostics dashboard page with additional settings for debugging dashboard pages. Mainly for my benefit during development, but may be of use to others extending ZBS.
Zone Based Shipping fires the following concrete5 events:
- zbs_address_to_zone_map_result - Fired when ZBS has determined a shipping zone for an order. Parameters are the $currentOrder and the $zone_id. Event handlers should return null or substitute zone_id.
- zbs_cart_calculation_result - Fired when shipping calculation is complete. Parameters are the $currentOrder and an array of eCommerce shipping type objects. Event handlers should return null or a replacement array of one or more shipping eCommerce shipping type objects.
Zone Based Shipping provides two blocks for showing documentation within normal site pages. These are primarily for use on demonstration sites, but may also be of use for sites providing their own documentation support for editors.
- Zone Based Shipping Documentation - All the ZBS dashboard page documentation in an accordion/expander.
- Zone Based Shipping Docs for Page - Documentation for a specific page.
Last updated: 11 months ago