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

If Satatement to remove Images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-04-2011, 01:28 PM
 
BillV BillV is offline
 

Senior Member
  
Join Date: Oct 2011
Posts: 105
 

Default If Satatement to remove Images

I am looking to remove the thumbnail images from the Products listing. I only want the images removed if the category is "126" and the product is assigned to a manufacturer.

I have many products that are assigned to categories other that cat 126 and are not assigned to a manufacturer. For these products, I want the thumbnail to show.

I have added the following to the products_list.tpl. but it does not seem to work.

{if $cat != '126'|| $manufacturers[id].manufacturer == '0' }

<a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>

{/if}

Thank you.
__________________
Bill

X-Cart 4.4.4
Websitecm - CDSEOPro
BCSEngineering - Back in Stock
BCSEngineering - Banners
BCSEngineering - Customer Rewards
XcartMods - Smart Template 4.4.4
XcartMods - Watermarked Images
Alteredcart - On Sale
Reply With Quote
  #2  
Old 11-08-2011, 04:57 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: If Satatement to remove Images

It appears your code will do the opposite of what you want, it should display the thumbnail. To test this, just temporarily add some text to the "if" statement...

{if $cat != '126'|| $manufacturers[id].manufacturer == '0' }
TEST
<a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>

{/if}
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 11-08-2011, 06:36 AM
 
BillV BillV is offline
 

Senior Member
  
Join Date: Oct 2011
Posts: 105
 

Default Re: If Satatement to remove Images

Thank you. I will give it a try.
__________________
Bill

X-Cart 4.4.4
Websitecm - CDSEOPro
BCSEngineering - Back in Stock
BCSEngineering - Banners
BCSEngineering - Customer Rewards
XcartMods - Smart Template 4.4.4
XcartMods - Watermarked Images
Alteredcart - On Sale
Reply With Quote
  #4  
Old 11-11-2011, 05:37 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: If Satatement to remove Images

Try this...
{if $cat != '126'|| $manufacturers[id].manufacturer == '0' }
TEST
{else}
<a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a>

{/if}

If all you see for cat #126 is "TEST" then you know the code works. You can replace "TEST" with whatever you want to do with cat #126 instead of displaying the thumbnail.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following user thanks JWait for this useful post:
BillV (11-11-2011)
  #5  
Old 11-11-2011, 07:58 AM
 
BillV BillV is offline
 

Senior Member
  
Join Date: Oct 2011
Posts: 105
 

Default Re: If Satatement to remove Images

Thank you sir.
Much appreciated.
__________________
Bill

X-Cart 4.4.4
Websitecm - CDSEOPro
BCSEngineering - Back in Stock
BCSEngineering - Banners
BCSEngineering - Customer Rewards
XcartMods - Smart Template 4.4.4
XcartMods - Watermarked Images
Alteredcart - On Sale
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 07:55 AM.

   

 
X-Cart forums © 2001-2020