X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   I need an {if} variable for detailed Images (https://forum.x-cart.com/showthread.php?t=54539)

FMF 07-09-2010 01:48 PM

I need an {if} variable for detailed Images
 
Hello,

I am trying to find an {if} statement so I can show an image if there is detailed images for a product and won't if there isn't. I looked through the detailed product images file and wasn't able to find anything I could use, but my coding knowledge isn't very good.

So what I am looking for is

{if "detailed images"} where "detailed images" is when there are detailed images on the page.

Any help?

carpeperdiem 07-09-2010 01:58 PM

Re: I need an {if} variable for detailed Images
 
In file,

/customer/main/product.tpl

you'll see some code for detailed images, including:

Code:

{if $active_modules.Detailed_Product_Images && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
 {include file="modules/Detailed_Product_Images/popup_image.tpl"}
{else}
...

This may be a starting place.

IF the detailed product images in on, and if there is a detailed product image, show the image, else....

WHERE do you want to show this image?

FMF 07-09-2010 03:10 PM

Re: I need an {if} variable for detailed Images
 
Thanks, I'll look into that file and see what I can come up with.

Quote:

Originally Posted by carpeperdiem
WHERE do you want to show this image?


As you may or may not be able to see from my poor photoshop pic below, I edited the product detail a while back so that now when there is a product with detailed images it causes my product descriptions text to shift the the right. If I put enough top padding on the Product details will shift back left once it gets passed the detailed pictures thumbnails, but then it would look bad on my products without detailed thumbnails

http://farmmanualsfast.com/Untitled-2.png

carpeperdiem 07-09-2010 03:29 PM

Re: I need an {if} variable for detailed Images
 
Maybe use a float for this? The float property will wrap text around an image, but if there is no image, the text will display. Not exactly a perfect description, but I use float to solve many design challenges. It may help??

http://css.maxdesign.com.au/floatutorial/

is one of many results from google

Good luck.

J

Shamun 07-09-2010 08:14 PM

Re: I need an {if} variable for detailed Images
 
Look in the debug console for detailed pictures. Find the array name and then try this:

{if $arrayOne.arrayTwo}
show
{else}
dont show
{/if}


All times are GMT -8. The time now is 01:20 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.