View Single Post
  #8  
Old 04-13-2011, 07:28 AM
 
duke57 duke57 is offline
 

Member
  
Join Date: Apr 2011
Posts: 12
 

Default Re: Hiding the Add to Cart button for certain parts

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}
__________________
X-Cart 4.4.2
Reply With Quote