Release Specific Upgrade Considerations
This document lists things you may wish to take into account as you upgrade. This includes:
- changes to the database schema or contents which deserve special notice
- changes to basic template operation
Note: Please be sure to also check Template Updates.
Another part of staying up to date is keeping your PHP version current. As you do this, you may need to address various common issues with PHP version incompatibility.
Be sure external links are constructed with
If you use a custom template, check it against the template changes list.
Zen Cart 1.5.8
Zen Cart 1.5.8 still runs on PHP 7.3 and 7.4 but was created for PHP 8+. PHP8 is a major change from PHP7, and many plugins will require work before they are usable. Work with the community and your developer to be sure any modifications you make are ready for PHP 8. See Upgrading plugins to work with 1.5.8/PHP 8.0+.
A new file,
includes/init_includes/init_non_db_settings.php, was introduced. Defined constants which are not language specific were migrated out of language files into this file.
Most “functions” (both admin and non-admin) have been consolidated into files located in
/includes/functions/. Some have been merged together. Some changes are listed below. This change was done to eliminate the duplication of identical (or nearly identical) functions between the storefront and admin that was present in prior releases.
Some functions have been renamed:
zen_draw_products_pull_downwas renamed to
zen_draw_products_pull_down_attributeswas renamed to
zen_draw_products_pull_down_categorieswas renamed to
zen_draw_products_pull_down_categories_attributeswas renamed to
Zen Cart 1.5.8a will provide aliases for these functions so that the old names will still work, but will create a deprecation log.
Language files were changed to a new format. See Developer Information on Array based Language files for more details. If you are upgrading, you may wish to consider doing only the basic language file customizations rather than port all the changes you had from prior releases. Core language files should be overriden in the new format; plugin language files may use the old or the new file format.
Because of the changes to language files, additional steps will need to be taken if you are trying to create global variables. In prior releases, defining a new variable in a language file was sufficient; now you will need to explicitly global it:
$GLOBALS['some_variable'] = $some_variable;
zen_parse_search_stringinput parameters have been reversed. Plugins that use this function will require modification.
zen_get_countriesreturns different array keys than previously. Admin plugins that use this function may use the new admin function
zen_cfg_read_onlyhas been added. This means any plugin authors who provided their own version of this function should remove it from their plugin (for 1.5.7+) or wrap it in
if (!function_exists('zen_cfg_read_only'))(for older versions of Zen Cart).
The misspelled notifier
NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATEhas been deprecated and replaced by
NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE. Code that references the misspelled notifier will continue to work (due to the event aliasing feature), but plugins should be updated to use the corrected name.
ROBOTS_PAGES_TO_SKIPwas previously located in the language file
meta_tags.phpdespite not being language-related.
It has been moved to its own file in
Plugin pages that do not require indexing (such as Back In Stock subscribe/unsubscribe) should be added to the list in the constant definition.
Zen Cart 1.5.7
The configuration constant
UPLOAD_FILENAME_EXTENSIONSwas removed from the database and replaced with an entry in
includes/classes/upload.php. If you have modified this constant from its original setting of
jpg,jpeg,gif,png,eps,cdr,ai,pdf,tif,tiff,bmp,zipyou will want to add a custom define (in a new file) in both your
YOUR_ADMIN/includes/extra_configures/directories to set all the allowed extensions you want to support site-wide.
Internal changes necessitated removing the following inclusions from
If you have created additional cron jobs and used this file as a base, please apply the 1.5.7 changes to your custom files.
The database field
products_description.products_viewedhas been deprecated. It will be deleted in a future release. Product view tracking is now done using the table
External links have been updated to use
rel="noreferrer noopener". If you use external links (for social networking, manufacturer sites, product URLs, etc.) you should update your template to adopt this practice.
shopping_cartpage no longer uses
shopping_cart.phplanguage file. You will need to move the content of that define to the new
A number of constants which were unused by the core were removed from language files. If you use a plugin which relied on these defines, you should expect a PHP Notice in your
/logsfolder. To resolve this, define the needed constants in a plugin specific file or an override, as appropriate. Some of the defines removed are
DATE_TIME_FORMAT, which some plugins may have used even though core Zen Cart code does not.
The Display Logs plugin is now built-in. If you had its files installed in prior versions, remove all those files as part of your upgrade. Then if you want to enable the plugin simply go to Admin > Modules > Plugins.
The Admin Login as Customer plugin, which allowed you to login on a customer’s behalf, is now built-in. If you had its files installed in prior versions, remove all those files as part of your upgrade, and configure as described on the Place Order help page.
The login form built by
includes/templates/template_default/templates/tpl_login_default.phpwas changed so that the
loginForm, rather than
login, as in prior releases. This is important since a direct reference to
loginFormis made in includes/modules/pages/login/on_load_main.js.
Zen Cart 1.5.6
$downloads, returned from
includes/modules/downloads, changed from a query result to an array. The following template files had to be updated to accommodate this change:
You will want to adjust any copies of these files in your template to process an array rather than a database query.
The table containing the EZ-Pages data (
ezpages) was split into two tables,
ezpages_content. This was done in order to add multi-language capabilities. Accordingly, any files (template overrides or custom files) which reference the
ezpagestable will need adjustment to account for this division.
Date format updates began in this release - see date standardization.
Zen Cart 1.5.5
The arguments for the notifier
NOTIFY_ORDER_AFTER_SEND_ORDER_EMAILwere changed. This necessitated a code change in the observers watching for it.
responsive_classictemplate was introduced in this release. If you are coming from an older release with an older template, be sure to check and verify that your template performs properly on mobile devices. If not, you can use Responsive Classic or select another responsive template.
Starting in this version, the email css was pulled out of the individual templates into a shared file called
email/email_common.css. If you are creating or updating email templates, you should follow this new practice.
The phpBB object was removed
Zen Cart 1.5.2
- The list of pages created by
includes/modules/pages/header_php.phpchanged from a query result to an array. So the template file
includes/templates/YOURTEMPLATE/templates/tpl_page_default.phphad to be updated to accommodate this change.
Zen Cart 1.5.0
- The admin menus are no longer built by files ending in
.dhtml. Instead, a new database table called
admin_pageswas introduced. Mods which create their own menu entries must also follow this convention. Guidelines for upgrading plugins to 1.5 include instructions on this step.
- PHP Errors, Warnings and Deprecated messages after upgrading
- PHP Idioms
- Release Specific Upgrade Considerations
- Upgrading plugins to work with 1.5.8/PHP 8.0+
… and when all else fails:
- PHP migration guides in the php.net documentation