Zen Cart Logo
Forums / Upgrading to 1.5.x / Fixing LARGE_IMAGE_WIDTH and LARGE_IMAGE_HEIGHT PHP notices

Fixing LARGE_IMAGE_WIDTH and LARGE_IMAGE_HEIGHT PHP notices

Views: 1,026

Results 1 to 2 of 2
21 Oct 2020, 11:07
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Fixing LARGE_IMAGE_WIDTH and LARGE_IMAGE_HEIGHT PHP notices

Symptom:

you get PHP notices (debug logs) like this:

#1 require(/includes/templates/custom/templates/tpl_modules_main_product_image.php) called at [/includes/templates/custom/templates/tpl_product_info_display.php:72]
#2 require(/includes/templates/custom/templates/tpl_product_info_display.php) called at [/includes/modules/pages/product_info/main_template_vars.php:153]
#3 require(/includes/modules/pages/product_info/main_template_vars.php) called at [/includes/templates/custom/common/tpl_main_page.php:171]
#4 require(/includes/templates/custom/common/tpl_main_page.php) called at [/index.php:94]

--> PHP Warning: Use of undefined constant LARGE_IMAGE_HEIGHT - assumed 'LARGE_IMAGE_HEIGHT' (this will throw an Error in a future version of PHP) in /includes/templates/custom/templates/tpl_modules_main_product_image.php on line 24.

Solution:

Run this in Admin > Tools > Install SQL Patches:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Large Image Width', 'LARGE_IMAGE_WIDTH', '150', 'The pixel width of large images', '4', '80', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Large Image Height', 'LARGE_IMAGE_HEIGHT', '120', 'The pixel height of large images', '4', '81', now());
22 Oct 2020, 05:43
#2
elemi avatar

elemi

Zen Follower

Join Date:
Mar 2006
Location:
Auckland, New Zealand
Posts:
242
Plugin Contributions:
0

Re: Fixing LARGE_IMAGE_WIDTH and LARGE_IMAGE_HEIGHT PHP notices

Thank you!!!!! ((hugs))