View Single Post
  #3  
Old 10-15-2007, 08:14 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Cart modification: how to hide option if product already in cart?

If you want the include after the list of products you can check in the loop that lists the products. Change this:
Code:
{section name=product loop=$products}
To this:
Code:
{assign var="gwfound" value="n"} {section name=product loop=$products} {if $products[product].productid eq 3491} {assign var="gwfound" value="y"} {/if}

Then after the {/section} wherever you want it add:
Code:
{if $gwfound eq "n"} {include file="customer/main/gift_wrap.tpl"} {/if}

If you want it before the list of products you'll probably have to add a second {section} {/section} block to loop through the array just to check for it.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote