View Single Post
  #4  
Old 09-10-2009, 03:54 PM
 
Richardl Richardl is offline
 

Advanced Member
  
Join Date: May 2009
Location: Australia
Posts: 42
 

Default Re: Disable 'Add to cart' for $0 products

thanks for both replies,

I copied the code into /customer/main/product.tpl

PHP Code:
{if $product.appearance.buy_now_buttons_enabled}
          {if 
$product.forsale ne "B"}
            <
div class="buttons-row buttons-auto-separator">
              {include 
file="customer/buttons/add_to_cart.tpl" type="input" additional_button_class="main-button"

to

PHP Code:
{if $product.appearance.buy_now_buttons_enabled}
          {if 
$product.forsale ne "B"}
            <
div class="buttons-row buttons-auto-separator">
{if 
$product.taxed_price ne 0}
{include 
file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
{/if} 

This method works well only when there is no product variants. New question now is what template(s) should I edit for those hav variants?

cheers
__________________
Version 4.2.1
Reply With Quote