Pages

Monday, July 23, 2012

Oscommerce 2.3.2 error opening the large images

Recently I found an error on my oscommerce instance. I couldn't open the large images when I clic on the small ones, so I did the following:

Search on product_info.php this code:


<div id="piGal" style="float: right;"> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?> </div>

Replacethe above code with the following:


<div id="piGal" style="float: right;"> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . ".jpg".'" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'].".jpg", addslashes($product_info['products_name']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?> </div>

What I've donde is to add the .jpg extension to the name of the large and small picture. This solution works just for .jpg images. So, if you're planning to use .png or .gif replace the .jpg for your favorite extension.