Re: Hide Add to Cart button when a certain Extra Field has a certain value
A checkbox (extra field) will either return content or not, not yes or no -- right?
SO --- try this:
{if $extra_fields[field].field eq "special" && $extra_fields[field].field_value eq ""}add to cart code here{/if}
that is: if the special filed is not checked (it's empty), show the cart code. if the special box is checked (or has any content) the add to cart code will not display.
I use 4.1.9 and this code works for me. I also use a checkbox for an extra field. Try it?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
|