View Single Post
  #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