Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

can't get this code for image non-resizing to work


Recommended Posts

Hi all,


I'm trying to get a very useful piece of code to work that I got from a previous poster who doesn't seem to use the forum anymore -the code is added to popup_image.php to enable the 'click to enlarge' link to open a big image in the pop-up window -with the product_info thumbnail image being literally just a thumbnail rather than a downsized version of the bigger image.


The code replaces what is currently in the <body> tags to:


<body onload="resize();">





// if the big image isn't shown uncomment the next line, and check the path:

// maybe you have to remove '/'. or adjust the path, depends on your configuration

// echo DIR_FS_CATALOG.'/'.DIR_WS_IMAGES.IN_IMAGE_SUBDIR.$products_values['products_image'];

? ? ? ? ? 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']);





'This code basically looks for an image in the directory "images/images_big" and shows it if it is there... if not, it will show the thumbnail...


'thats it! Just put the thumbnails in your images directory, and create a directory called "images_big" inside the images folder (images/images_big) and upload the full size images into the images_big folder. The thumbnails can be uploaded via admin... but I don't have a solution to upload the big images via admin... using FTP to upload them works just as well I think.'


BUT I can't get this to work! -I just get a message about a parse error in the popup window. Any ideas anyone about how to tweak the code for my particular site? I've tried the adjustments he says but I must be missing something. Here is my test page:



please help!

Link to comment
Share on other sites

  • 7 months later...


This topic is now archived and is closed to further replies.

  • Create New...