View Single Post
  #32  
Old 03-12-2006, 06:03 AM
 
ianwebster ianwebster is offline
 

Member
  
Join Date: Mar 2005
Posts: 14
 

Default

Like I say, if you make all your "variant" images the same size, then you can use the method that I explained in full earlier in this thread.

However, (for the purposes of showing the relevant "variant" image in the cart) if your variant images are different sizes then you will need to amend the previous code I gave to include the php function
Code:
getImageSize()
which sniffs the image size. That way you can dynamically output the width and height attributes proportionately in the cart.

Note this all assumes that you want to use large "variant" images on the product page and small thumbnail versions in the cart. In actuality we are using the same images but using the width and height parameters in the cart to make them into thumbnails so we can save on screen real estate)

Have a look at http://uk2.php.net/getimagesize for the full detail of the return values.

Since I am not using different size images, I dont really have a great need to investigate in detail how to implement this feature -- but in principle this will be the way to go (assuminmg you have a basic knowledge of php programmiung, you should be able to make some minor changes to include getImageSize instead of hard coding the width/height params as I currently do)
__________________
4.0.12
Linux
Reply With Quote