Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

image size


AWWWW.WAHWAH

Recommended Posts

Is there a way to resize the images different than what you enter in the configuration admin section?

 

For example. we have the full size pop up images at 320x240. Now the thumbnail is 160x120, that is the image size on the product page. When you are in a subcategory that lists all the products on that page, it shows the thumnails at 160 x120. We would like it to be at 80x60 in the listing because 160 x120 is too big.

 

So basically we have three main categories, that image is 160 x 120

 

in each category we have a subcategory, when you click on the subcategory it lists all those items in there with the thumbnail at 160 x 120. we'd like it to be 80x60, then when u click on any product in the subcategory, the thumbnail is 160 x 120 which is correct when u get to the product page, here is a screen shot of what is currently at 160 x 120 and we want it at 80 x 60 but there is no config for it in the admin section.

 

imagefix.jpg

Link to comment
Share on other sites

So you want 3 image sizes, right? Thumbnail, Product Info and Pop Up?

 

If that is what you require, the easy way is to set your Small Image Width and Small Image Height to 80x60, from your osC Admin. Then open product_info.php in a text editor and find this code:

 

SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,

 

And add a multiply operator to them, like so:

 

SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2,

 

That will double the sizes - x2. There are 2 instances of that code in product_info.php so change both.

Link to comment
Share on other sites

So you want 3 image sizes, right? Thumbnail, Product Info and Pop Up?

 

If that is what you require, the easy way is to set your Small Image Width and Small Image Height to 80x60, from your osC Admin. Then open product_info.php in a text editor and find this code:

 

SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,

 

And add a multiply operator to them, like so:

 

SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2,

 

That will double the sizes - x2. There are 2 instances of that code in product_info.php so change both.

 

 

Hey thank you so much, that worked. All I had to do is change the first instance and add *2. Perfect, just the way I wanted. You should add this to the contribution depo as a .txt file at least.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...