View Single Post
  #5  
Old 10-12-2009, 05:50 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Hide Add to Cart button when a certain Extra Field has a certain value

I've been able to work with Extra fields in v4.1.9 with using the loop through. I haven't upgraded to v4.2, so there may be different variable names needed.

{section name=field loop=$extra_fields}
{if $extra_fields[field].service_name eq "Special" && $extra_fields[field].field_value eq "No"} 
{elseif $extra_fields[field].service_name eq "Special" && $extra_fields[field].field_value eq "Yes"}
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
{/if}
{/section}

If this doesn't work, you may need to create a .tpl to place in your Extra_Fields folder and use the include to call out the loop through for the product.tpl.
__________________
______________
version 4.1.9 Gold
Reply With Quote