Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

product info default image


Recommended Posts

Hiya all, hope everyone had a gr8 xmas and a happy new year.


Heres me problem, I want to have the product image on the product info page set to display the image that I origianlly uploaded without the popup, I have narrow it down to the catalog/product_info.php on the following line

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'],  'hspace="10" vspace="20"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>


had a few goes at it over xmas, but it always seems to throw errors out as im really new to coding, can anyone please help me out or point me to the right direction?


many thx

Link to comment
Share on other sites

To have the just the image show up without the click to enlarge you replace


<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');



<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>





<?php echo tep_image(DIR_WS_IMAGES .$product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?>


Now this will show the image using the small image size you have set in your admin, if you want to use a different size you can replace the SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT with what size you want to use.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites


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

  • Create New...