View Single Post
  #5  
Old 02-13-2012, 06:59 AM
 
denisgre denisgre is offline
 

Newbie
  
Join Date: Jan 2012
Posts: 8
 

Default Re: Remove Buy Now button.

Thanks for that, worked a treat .

The hardest part is knowing just where to put the code.

I have removed the "Buy Now" button on product lists where the price is ё0.00 and replaced it with CALL FOR PRICES instead.

I have also removed "Add to cart" button in the product details pages for zero priced items and used the same message.

In the /skin/custom_scheme/customer/main/product_details.tpl file:
(The added bits are in red text. The other is part of the standard file and should not be removed):

{if $product.appearance.buy_now_buttons_enabled}

{if $product.forsale ne "B"}

<ul class="simple-list">
<li>
<div class="buttons-row buttons-auto-separator">


{if $product.price gt 0}

{include file="customer/buttons/add_to_cart.tpl" type="input" additional_button_class="main-button"}

{else}
<font color="red" size="2"><b>CALL FOR PRICES</b></font><br><br>
{/if}


In the /skin/common_files/customer/buttons/buy_now.tpl file:

{if $product.price gt 0}
{include file="customer/buttons/button.tpl" button_title=$lng.lbl_buy_now additional_button_class=$additional_button_class|c at:' add-to-cart-button'}
{else}
<font color="red" size="2"><b>CALL FOR PRICES</b></font><br><br>
{/if} {* END TEST *}


I have included the above for anyone using V4.4.3 who may have the same enquiry. Ours is a customised site so the file shown above in the custom_scheme folder will probably be in the scheme folder for the site.

Hope this helps.

Denis.

__________________
v4.4.3
Site is http://www.mercersfurniture.co.uk
Reply With Quote