| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to Reference the Detailed image width and height values? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to Reference the Detailed image width and height values?
Hi,
I need to be able to pass the width and height of the detailed images into some code. I know that {$product.image_x} and {$product.image_y} gives me the value for the thumbnail width and height. What is the corresponding variable that holds the detailed image width and height, or how can I generate this? Thanks, Philip.
__________________
----------------------------------------- X-Cart5 v5.2.16 (Live) ----------------------------------------- |
|||||||
#2
|
|||||||
|
|||||||
Not sure X-Cart defines these by default, as the detailed image just defaults to its actual size. TelaFirma has done a detailed image mod that defines these though, may want to check with him or buy his mod.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
I ended up placing a ticket with support. Actually its rather simple to do using the following snippet.
{$images[array_element_number].image_x} {$images[array_element_number].image_y} So if you wanted to acces the first detailed image's width and height, you would use; {$images[0].image_x} and {$images[0].image_x} and if you wanted to refer to all the stored images for a product, you could use the following section definition to loop through them. {section name=image loop=$images} {$images[image].image_x} {$images[image].image_y} {/section} Hope someone else finds the info useful. Philip
__________________
----------------------------------------- X-Cart5 v5.2.16 (Live) ----------------------------------------- |
|||||||
#4
|
|||||||||
|
|||||||||
Re: How to Reference the Detailed image width and height values?
Philip, do you have any code example of how to pass the width and height of the detailed images into detailed image code?
|
|||||||||
#5
|
|||||||
|
|||||||
Re: How to Reference the Detailed image width and height values?
You might do something like this:
Code:
This will keep any detailed image at or under 460px in width in or to keep it from breaking a style.
__________________
4.0.19 |
|||||||
|
#6
|
|||||||
|
|||||||
Re: How to Reference the Detailed image width and height values?
Not really what I was looking for, but it pointed me in the right direction and I solved my problem.
So thanks alot and kudos to you.
__________________
XCart 4.7.10. |
|||||||
|
|||
X-Cart forums © 2001-2020
|