Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product_info.php Image Modification help needed


matrix1000

Recommended Posts

Posted

I would like to have the image in the product description page to be displayed with an image size of 250 X 250 (or the default size of the actual image).

 

I have found the code in product_info.php that generates the picture but cant figure out how to make the image size the size I need.

 

Would appreciate any help or information about how to modify the php.

 

Thanks :D

 

<table border="0" cellspacing="0" cellpadding="2" align="left">

<?php

   if ($product_info_values['products_image'] != '') {

?>

         <tr>

           <td align="center" class="smallText">

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

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

//--></script>

<noscript>

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

</noscript>

           </td>

         </tr>

<?php

   }

?>

       </table>

Posted

The defined values for SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT

will set the image's width and height (both can be found in the Admin under Configuration -> Images)

 

Removing them and saying '', '' instead will cause the tep_image() function to take the actual size of the image.

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Changing the size in the admin will have the same effect on any image that has SMALL IMAGE as an attribute.

 

If making the small image larger affects too many things, change the SMALL IMAGE in product_info to the MEDIUM IMAGE or use Mattice's solution.

Posted

Oops Ok I understand ... just change it on the product_info.php page but not under Admin under Configuration -> Images so only the product info page is affected :D :D

Archived

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

×
×
  • Create New...