If your site runs on a version of Zen Cart Zen Cart 2.0.0 or 2.0.1, there are some core-file changes required for the encapsulated versions of various plugins to operate correctly on your storefront.
You can most likely simply replace (or add) a file to your site to enable an updated plugin's use. Be sure to have a backup copy of the original file, just in case the updated file causes issues on your site!
Depending on your updated plugin's directions, following is an overall list of the various Zen Cart base files that were changed in the zc201 to zc210 transition to enable additional features in encapsulated plugins.
This file, updated in releases following Zen Cart 2.0.0 via PR 6462 enables an encapsulated plugin to provide additional AJAX handlers.
This file, updated in the release following Zen Cart 2.0.1 via PR 6480 corrects the storefront auto-load of an encapsulated plugin's class files.
This file, updated in the release following Zen Cart 2.0.1 via PR 6493 enables storefront overrides of an encapsulated plugin's extra_definitions language files.
This file, updated in the release following Zen Cart 2.0.1 via correctly supplies an encapsulated plugin its currently-installed version on any upgrade (PR 6498) and adds support for the helper-class (PR 6456).
This file, added in the release following Zen Cart 2.0.1 via PR 6456 adds some "helper" functions for a plugin's installation.
This file, added in the release following Zen Cart 2.0.1 via PR 6456 adds some "helper" functions for a plugin's installation.
PR 6682 and PR 6735 added support, enabling encapsulated plugins to contain order-total, shipping and payment modules. The following files were changed or added to accomplish this:
/admin/modules.php/includes/classes/order_total.php/includes/classes/shipping.php/includes/classes/payment.php/includes/classes/ResourceLoaders/ArraysLanguageLoader.php/includes/classes/ResourceLoaders/LanguageLoader.php/includes/classes/ResourceLoaders/ModuleFinder.php(added)
PR 6773 added support this support, enabling an observer to query details about the plugin version/directory in which it is located. Helps with:
- knowing what version is in effect
- knowing what context we're in (admin/catalog/Installer)
- loading a catalog stylesheet via a plugin, first from plugin directory, and then from active template directory (as an override), without having to publish files to the core catalog directory.
The following files were changed/added to accomplish this:
/includes/classes/ResourceLoaders/PageLoader.php/includes/classes/traits/InteractsWithPlugins.php(added)
PR 7004 adds support for encapsulated payment-modules to provide their admin notifications to the admin's Customers :: Orders tool's detailed display. This PR was accepted post-zc210 release and contains changes in
/admin/orders.php.
PR 7099 adds support for encapsulated plugins that include storefront page-specific files, e.g. includes/modules/pages/checkout_shipping/header_php_myplugin.php. This PR was accepted post-zc210 release and contains changes in the following files:
/index.php/includes/classes/FileSystem.php/includes/classes/ResourceLoaders/PageLoader.php/includes/templates/template_default/common/html_header_js_loader.php
PR 7191 adds Zen Cart 'base' handling for encapsulated plugins that use a ScriptedInstaller.php for their install/update/uninstall processing. It's especially important for plugins that provide sideboxes and/or order-total/payment/shipping modules. This PR also has prerequisites on these PRs:
- PR 7196 provides a common function (used above) to manage the various Zen Cart modules' installation status.
- PR 7197 Corrects multiple loads of a module's language file and updates the
ot_gv.phpmodule to check database settings rather than constants. - PR 7198 Makes a modification to
zen_get_shipping_enabledto allow its use within the plugin-manager.
These PRs were accepted post-zc210 release and contain changes to the following files:
/admin/modules.php/includes/classes/PluginSupport/ScriptedInstaller.php/includes/classes/PluginSupport/ScriptedInstallHelpers.php/includes/classes/ResourceLoaders/BaseLanguageLoader.php/includes/classes/ResourceLoaders/LanguageLoader.php/includes/functions/functions_general_shared.php/includes/modules/order_total/ot_gv.php
Note: Encapsulated plugins that provide a ScriptedInstaller.php in their distribution 'should' ensure that the last action in their executeInstall, executeUpgrade and executeUninstall methods is a call to the parent class' method (passing any input parameters).
For example, an executeUpgrade method should end with
parent::executeUpgrade($oldVersion);PR 7210 now autoloads the subject files from an encapsulated plugin version's root-directory for both admin and storefront processing. This PR was accepted post-zc210 release and contains changes in the following files:
/admin/includes/application_bootstrap.php/includes/application_top.php