A small error in Zen cart pre-loading

Source: Internet
Author: User
Tags zen cart

Some custom constants need to be added to the database to facilitate background settings. However, it is found that the throttling control constant set in the background is still invalid and not executed as expected. Check breadcrumb
ClassCodeNo problem. The database configuration is normal, and the script init_db_config_read.php
It's no problem to print the constant value directly. It's strange that other constant settings are running normally. When I was puzzled, I suddenly thought of breadcrumb.
The class is loaded before the database constant, and there is only one possibility. Check the execution sequence of the two files with die (). It is clear that the background settings do not work. Open
Includes/auto_loaders/config. Core. php
, You can see a variety of class
Initialization is the first, followed by other pre-loading operations.

#70
$ Autoloadconfig [0] [] = array ('autotype' => 'class ',
'Loadfile' => 'breadcrumb. php ');

#106
$ Autoloadconfig [40] [] = array ('autotype' => 'init _ script ',
'Loadfile' => 'init _ db_config_read.php ');

Solution: Set the breadcrumb loading sequence after init_db_config_read, that is, to change the subscript 0 to 40, for example, 50:

#70
$ Autoloadconfig [50] [] = array ('autotype' => 'class ',
'Loadfile' => 'breadcrumb. php ');

 

This may occur in other cases. It should be a small bug of Zen cart.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.