Hide Add to Cart button when a certain Extra Field has a certain value
Working on v4.2.2 here.
I've set up an Extra Field (Special is it's name).
The value of this field can be Yes or No.
If this field is set to Yes, the Add to Cart button should be hidden so customers cannot purchase the product.
I have tried various things on customer/main/product.tpl, but have had no luck.
e.g. {if $v.active eq "Y" && $v.field eq "Special" && $v.field_value eq "No"}add to cart code here{/if}
Adding this to the product.tpl hides the add to cart button on all product pages, whether the 'Special' extra field is set to Yes or No.
Any help would be most appreciated.
Thanks
__________________
/joannet/
X-Cart version 4.1.9 and above
|