| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Automatic Thumbnail Resize | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() A client of mine didn't understand how to resize his images before he added them to the cart, so I wrote a quick and dirty mod to automatically resize them when he uploads them.
WARNING: - it only works for jpg's (although it can easily be changed) - it only works for images stored in the file system - it uses GD. Some servers may not have GD installed (most will) - the width is hard coded, you need to change it to the width of your images. It is line number 39 below. - it will not work for batch imports, only thumbnails added through the Modify Products section In /cart/include/func.php replace the function func_get_image_content with this: Code:
I'm sure someone with a little more time on their hands could develop this into a nice mod that works for all images, not just thumbnails and jpg's and gets its settings from the admin area.
__________________
|| E L E V E N || |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Depends on your version of GD too, the latest doesnt support GIF's at all and some will only resize images in 256 cols instead of supporting true colour.
Nifty mod tho kudos on posting it, I'll have to try it later on, maybe x-cart could put a similar on in the main program with a config for switching auto resizing on or off ![]()
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Yeh, nice post..
I think it would be a great addition if xcart were to add a utility that resizes the images as standard. Many users have no idea on how to use image editing packages and this would save a lot of bother for them. It could create 2 sizes, one for thumbs and one for detailed images.
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#4
|
|||||||
|
|||||||
![]() Quote:
Hi Shan, nice one! Do you think this would work for sub-category icon thumbnails? I have read the forum and upgraded the sub-cat tpl to now show icons at the sub cat level, but unfortunately it resizes the 3 menu columns based on the width of the images - would the above mod limit the thumbnail size for sub-cat? Or do you happen to know how to do this ... See http://www.makeuwell.com.au/home.php?cat=66 for details of what is now happening (live site) Cheers L
__________________
x-cart gold 4.1.9 x-cart gold 4.1.5 www.makeuwell.com.au www.amberbebe.com Sydney Australia |
|||||||
#5
|
|||||||
|
|||||||
![]() Any updates on this? (quite an old post)
Re-sizing / cropping thumbnails would be a huge help for clients!
__________________
X-Cart Pro 4.4 |
|||||||
|
|||
X-Cart forums © 2001-2020
|