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

I need an {if} variable for detailed Images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-09-2010, 01:48 PM
 
FMF FMF is offline
 

Advanced Member
  
Join Date: Apr 2010
Posts: 77
 

Default 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?
__________________
X-Cart GoldPlus: 4.6.4
reBOOT Template
CDSEO Pro 2.0
Total Server Solutions Hosting
Reply With Quote
  #2  
Old 07-09-2010, 01:58 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 07-09-2010, 03:10 PM
 
FMF FMF is offline
 

Advanced Member
  
Join Date: Apr 2010
Posts: 77
 

Default 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
__________________
X-Cart GoldPlus: 4.6.4
reBOOT Template
CDSEO Pro 2.0
Total Server Solutions Hosting
Reply With Quote
  #4  
Old 07-09-2010, 03:29 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 07-09-2010, 08:14 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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}
__________________
- Shane Munroe
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:58 AM.

   

 
X-Cart forums © 2001-2020