Upgrading to CRE Loaded 6.4 and its pitfalls

For some reason an upgrade of your current CRE Loaded store from 6.2 to 6.4 just didn't work out right. These steps and tips should make sure you've got it all covered.

Run the installer

If you're upgrading on your local WAMP setup before deploying live, the installer can't handle the use of drive letters. In the Existing CRE Store field it will default to something like the following:


Just drop the leading drive letter for it to process properly:


Check configurations are up to date

After the upgrade, check through the configuration table to make sure you have all the keys found in the install\sql\creloaded_configdata.sql file. If your database is missing a key or two you could find yourself with a shopping cart that functions only most of the way.

Take zero shipping as a case. Where the customer goes through checkout, rests at the confirmation screen but takes to the toilet because of a bad case of the explosives and when they come back, are logged out. They log back in and use their browser history to return to the confirmation screen. You may soon see an order placed with no selected shipping.

That's because you're missing the SHIPPING_SKIP configuration key and they were able to bypass that through the URL hack. To fix that, run the following query:

INSERT INTO configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)
('Skip Shipping Page', 'SHIPPING_SKIP', 'No', '<ul><li><b>No</b> - do not skip shipping page.<br /><a href="javascript:free_shipping_module_page();"><u>FREE SHIPPING Module</u></a></li><li><b>Always</b> - skip shipping page entirely.</li><li><b>If Weight = 0 </b>- skip shipping page if weight is zero.', 7, 7, '2011-11-11 16:41:13', '2011-11-08 01:35:38', '', 'tep_cfg_select_option(array(''No'', ''Always'', ''If Weight = 0''),');

Template setting

The upgrade may point the store to a new or incorrect template directory. You'll need to adjust the database to point to what it should render pages with.

Run this SQL (where your current/existing template was named old_theme as is the directory) to update the configuration table so it's pulling the right theme to render pages:

UPDATE configuration SET configuration_value = 'old_theme' WHERE configuration_key = 'DEFAULT_TEMPLATE';

Make sure that the template and infobox_configuration tables have the correct row information. Pay particular attention to the template_id information in respective columns to cross-reference.

Preview of template design

Take a screenshot of the site and save the 430 x 450 image as preview.gif and place it in the images folder of the site template.

Admin login page

Save a version of the store logo no wider than 400 pixels over admin/images/window-logo.png for the admin login screen.

CAPTCHA fields on template pages

Find these in the respective content folder of template. They will be used as part of the spam checking of the upgrade and if not present, will render parts of the site unusable or dump out errors the customers would be scratching their heads about. At least in the expected fashion.

Language files

Run a diff to compare the files in the language directory to make sure you copy across or update any relevant files.

One to watch out for includes the header_tags.php file which installs the generic version on upgrade. You may want to instead port across the store specific keywords and description definitions.


Unless your store is based in US Eastern, you should configure the application_top.php files to the timezone of where you do business.

Look for the following line:

if ( ! defined(STORE_TIME_ZONE)) define('STORE_TIME_ZONE', 'America/New_York');

And replace America/New_York with the appropriate timezone. Take a look at the list of supported timezones in case you're not sure which are valid.

Stop notification emails

If a database connection fails or a query is wrong, the store will send out an email. This can get annoying real fast. And if you're working for a client, will see you get some emails asking about it.

The culprit is in the tep_db_error function, found in the includes/functions/database.php file. Make sure the constant TEP_STOP_NOTIFY is set to a developer email address and not the store. That way you can catch the errors to work on without flooding the store owner's inbox.

If TEP_STOP_NOTIFY isn't already defined somewhere, plug in this SQL query:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)
VALUES ('E-Mail Address', 'TEP_STOP_NOTIFY', 'user@example.com', 'Email address to notify of database errors', 1, 3, '2011-11-29 09:41:03', '2011-11-08 01:35:38', '', '');

Be sure to use your own email address in the above query.

Then you'll be able to update it from the Admin → Configuration settings page.

» Back to main projects/code listing