Friday, January 12, 2007

ZenCart Manufacturers System Errors

by damonp on January 12, 2007

in Ecommerce,SQL

In ZenCart versions immediately prior to 1.3.6 using many of the public side manufacturers functions may produce this error:

Warning: constant(): Couldn't find constant in  .../includes/init_includes/init_add_crumbs.php on line 45

The error is caused by a missing database column that was added in the official 1.3.6 release. If upgrade is not immediately possible the following SQL snippet will correct the problem in most cases:

ALTER TABLE get_terms_to_filter ADD get_term_table varchar(64) NOT NULL;

ALTER TABLE get_terms_to_filter ADD get_term_name_field varchar(64) NOT NULL;

UPDATE get_terms_to_filter SET get_term_table = 'TABLE_MANUFACTURERS', get_term_name_field = 'manufacturers_name' WHERE get_term_name = 'manufacturers_id';

UPDATE get_terms_to_filter SET get_term_table = 'TABLE_MUSIC_GENRE', get_term_name_field = 'music_genre_name' WHERE get_term_name = 'music_genre_id';

UPDATE get_terms_to_filter SET get_term_table = 'TABLE_RECORD_COMPANY', get_term_name_field = 'record_company_name' WHERE get_term_name = 'record_company_id';

If you are using other product types, some additional UPDATE statements will be required for your new product types.

I found this solution after some searching on the ZenCart forums.

Popularity: 1%

{ 0 comments }