Cart modification: how to hide option if product already in cart?
I've created a snippet of code to add a giftwrap option to the shopping cart (a hidden product, click to opt-in).
However, I want this NOT to show up if there is already giftwrap in the cart.
Obviously the basic structure I'm after is something like:
{if [cart contents] [does not contain] [product 3491]}
{include file="customer/main/gift_wrap.tpl"}
{/if}
but I'm not sure what variables to use in the if statement, or indeed, what expression Smarty uses for a "does not contain" match (so far I've just seen equals, not equals, greater than, less than etc. etc.)
Can anyone advise here?
Many thanks,
Rachael
__________________
--
X-cart Version 4.1.9
|