View Single Post
  #1  
Old 08-16-2006, 08:49 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default if/then statement question for products.tpl

Hello,

In the products.tpl template I want to exclude any product from showing the buy now button when there are options for that product.

What would be the if/then statement to use?





Also, I tried to exclude certain categories from showing the buy now button in the products.tpl but could not get it to work as I read in other posts.

This is the code example that was given:
Code:
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y" and $products[product].categoryid ne "5"}

This is the code I tried on a 4.0.18 version and it does not work:
Code:
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y" and $products[product].categoryid ne "370"} <td valign="top" align="left">{include file="customer/main/buy_now.tpl" product=$products[product] style="button"}</td>{/if}{/if}

I would appreciate any help on these two issues. Thanks alot

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote