TBBucs Posted March 30, 2008 Posted March 30, 2008 I found the following code (used in popup_image.php) from another topic that looks for an enlarged product image in a directory called images_big: <body onload="resize();"> <?php define('IN_IMAGE_SUBDIR','images_big/'); //echo DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_name']; if (is_file(DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'])) $image = DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image']; else $image = DIR_WS_IMAGES . $products_values['products_image']; echo tep_image($image, $products_values['products_name']); ?> </body> Suffice it to say, it didn't work. I click 'enlarge image' and I get a blank popup window. I tried echo-ing the directory to see where it was pointing, and it is looking at the right place, but the $products_values['products_image'] variable is not returning a value. So the result of the echo was: .../public_html/images/images_big/ So for whatever reason, there is no value stored in the $products_values array. I'm not sure why, but that's definitely the problem. Any ideas as to what's going on?
usernamenone Posted March 30, 2008 Posted March 30, 2008 download the most current copy of oscommerce and extract the popup_image.php and replace that code with yours. If you still have issues the open product_info.php and replace your javascript for the popup.
chamtech Posted April 1, 2008 Posted April 1, 2008 I found the following code (used in popup_image.php) from another topic that looks for an enlarged product image in a directory called images_big: <body onload="resize();"> <?php define('IN_IMAGE_SUBDIR','images_big/'); //echo DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_name']; if (is_file(DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'])) $image = DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image']; else $image = DIR_WS_IMAGES . $products_values['products_image']; echo tep_image($image, $products_values['products_name']); ?> </body> Suffice it to say, it didn't work. I click 'enlarge image' and I get a blank popup window. I tried echo-ing the directory to see where it was pointing, and it is looking at the right place, but the $products_values['products_image'] variable is not returning a value. So the result of the echo was: .../public_html/images/images_big/ So for whatever reason, there is no value stored in the $products_values array. I'm not sure why, but that's definitely the problem. Any ideas as to what's going on? Shouldn't you use 'file_exists' instead of 'is_file' if (file_exists(DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'])) echo DIR_FS_CATALOG.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_name']; else echo DIR_FS_CATALOG.DIR_WS_IMAGES.$products_values['products_name'];
Recommended Posts
Archived
This topic is now archived and is closed to further replies.