Quote:
Originally Posted by duke57
I basically created an extra field with the service name: NO_ADD_CART, and the field name: "No Add To Cart Button", for every product.
This is the code that I placed in the template common_files/customer/buttons/add_to_cart.tpl which is making the add to cart button dissappear for every product on the site.
{*
$Id: add_to_cart.tpl,v 1.1 2010/05/21 08:32:02 joy Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{if $extra_fields.field eq "NO_ADD_CART" and $extra_fields.field_value ne "no"}
{include file="customer/buttons/button.tpl" button_title=$lng.lbl_add_to_cart additional_button_class=$additional_button_class|c at:' add-to-cart-button'}
{/if}
|
$extra_fields is an array, you have to loop through it or use the exact array element #, you can't use $extra_fields.field as there is no such thing
{foreach from=$extra_field item=ef}
{if $ef.service_name eq "NO_ADD_CART" && $ef.field_value ne ""}
YOUR CODE HERE
{/if}
{/foreach}