Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Resizing the Product Image


Xeoalpha

Recommended Posts

Posted

Im trying to resize my product images, I can't find the code. Need some help please :)

 

Closest I can find is in the products_info.php - I can't find where my image is being restricted to 100x80.

 

<!-- display image -->

<?php

if (tep_not_null($product_info['products_image'])) {

?>

<table cellspacing="0" cellpadding="2" align="center">

<tr>

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

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

//--></script>

<noscript>

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

</noscript>

</td>

</tr>

</table>

<?php

}

?>

<!--end display image -->

Posted

Exactly which images are you trying to resize?

 

In your admin control panel, under configuration there is a link called "Images" You can define the size of "small image" "heading image" and "subcategory image" here.

 

However, even if you change these, when you click on a product where it says "click to enlarge" your image will show up in a window, sized to whatever size the image was when you uploaded it originally.

 

Not sure if I've answered your question but I hope this helps you.

 

Robin

Posted

means the osc will get the image dimensions width/height and make an approximation on the width/height parameters, if they're provided, in order to create an aspect ratio based on the original image. Otherwise it will simply output the image with the original dimensions.

Archived

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

×
×
  • Create New...