Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Thumbnail values and resizing

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-01-2005, 06:56 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default Thumbnail values and resizing

When I create a new product X-Cart automatically inputs the x and y image values in the products table. Consequently, when I physically resize and reupload the image, my product.tpl is giving the wrong height and width values. I normally change this using PHPMyAdmin but the problem is I've just resized all my thumbnails and am wondering the easiest way to update the database?

I also notice that the code for displaying the thumbnails in products.tpl is different from the product.tpl code and I'm wondering which one I should be using. Products.tpl doesn't take into account the x and y values in the database so displays the image correctly.

product:
Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url}

products:
Code:
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}

This is a 3.5.4 store that X-Cart upgraded to 4.0.12 so I'm not sure what the default should be.

Thanks

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #2  
Old 08-01-2005, 07:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Products.tpl uses the setting in General settings/Appearance options to resize the image. Product.tpl defaults to the image size. Are your images in the DB or filesystem? You could just remove this from the product.tpl template to get them to resize automatically:

image_x=$product.image_x image_y=$product.image_y
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-01-2005, 07:21 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Thanks Balinor, they're in the filesystem. I've also got the appearance options to default to actual image size (00) as they don't turn out to well when resized.

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #4  
Old 08-10-2005, 06:55 PM
 
bobbyftk bobbyftk is offline
 

Senior Member
  
Join Date: Jun 2005
Posts: 167
 

Default

Quote:
Originally Posted by balinor
Products.tpl uses the setting in General settings/Appearance options to resize the image. Product.tpl defaults to the image size. Are your images in the DB or filesystem? You could just remove this from the product.tpl template to get them to resize automatically:

image_x=$product.image_x image_y=$product.image_y

i was having exact same issue. this worked perfectly. thanks!

now i notice its doing it on the admin side when editing a product, the thumbnail is still trying to show at the old size (300 px wide when the image is actuall only 200 now).
any idea what (and where) to modify the code "image_x=$product.image_x image_y=$product.image_y" on the admin side? can't seem to find it.
__________________
4.2.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:50 AM.

   

 
X-Cart forums © 2001-2020