| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Thumnails reduced by % | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
![]() Although I agree that it's probably best to resize your images, I think it's possible to do what you're asking.
I think the following code will work in products.tpl (I haven't tested it). If you're wanting to make the change to the single product page, you'd use $product.image_x. Code:
|
|||||||
#12
|
|||||||
|
|||||||
![]() Thanks for that. However, this code is not reducing the imagesize. Is there anything I have to add ?
|
|||||||
#13
|
|||||||
|
|||||||
![]() I tested the code and it worked fine. I'm running x-cart version 3.4.3.
The one thing to check is that the widths of your images are being stored in the 'xcart_products' table. In newer versions this is added automatically when you upload your images. Older versions don't do it automatically. You could add the widths manually if you wanted. One more thing, the line in my code: Code:
Should be changed to: Code:
By the way, this code will make all of your images 1/3 of their actual size. If you wanted them to be 1/4, you could change the equation to "x/4". For 30% you could change the equation to "30 * (x/100)". |
|||||||
|
|||
X-Cart forums © 2001-2020
|