OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Resizing product images
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > General Support
blase40
How can I enlarge the image of the product on product_info.php? It is set to:

SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT

I don't want to change these values in my image settings because it would mess up many other parts of my site. What can I do to simply change the size of the image on the product_info.php page only?
socal_kl
QUOTE (blase40 @ Jan 17 2008, 01:33 PM) *
How can I enlarge the image of the product on product_info.php? It is set to:

SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT

I don't want to change these values in my image settings because it would mess up many other parts of my site. What can I do to simply change the size of the image on the product_info.php page only?



Admin-->Configuration-->Images-->Small Image Width+Height

IF that doesn't work, if you look for .img in your stylesheet you can also set it there .. good luck.
blase40
Changing the width and height this way is going to change the size of all images on my site that use SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT won't it? I only want to change the size of the product image on product_info.php.
Enzo_UK
The only other way is to open the 'product_info.php' page and manually set the size to somthing else, rather than using the SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT
blase40
That is exactly what I am looking to do... my question is how do I do that? Thanks!
Enzo_UK
Open product_info.php in whatever editor you have.... and look at about line 108, where it says:

CODE
<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>


You can see where it sais the SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT, and you should just be able to put fixed sizes in there instead.
blase40
Sounds easy enough.... now for my last question... (I have very limited PHP knowledge in case you cant tell)

If I want my images to be 180x180, what exactly should I replace SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT with?

Thanks
ELnew
wanting to know the same thing, my trial and error hasn't worked yet.
blase40
My trial and error has me about ready to pull my hair out laugh.gif
ELnew
QUOTE (blase40 @ Jan 18 2008, 03:41 PM) *
My trial and error has me about ready to pull my hair out laugh.gif



Yeah I hate this...
blase40
I hate to be a "bumper", but I am stuck right now and have no idea how to do this. If anybody can shed some light on this I would be eternally grateful for them.
JangoF
QUOTE (blase40 @ Jan 18 2008, 03:54 PM) *
If I want my images to be 180x180, what exactly should I replace SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT with?

'180' and '80' (note these are not apostrophes)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.