View Single Post
  #10  
Old 01-14-2014, 11:39 AM
 
Dawn Howard Dawn Howard is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 229
 

Default Re: Remove Buy Now button.

Thanks for this Denis! Would the code:

{if $product.price gt 0}

change at all for american dollars? I'm not sure if your "gt" represents your currency.

Thanks in advance!


Quote:
Originally Posted by denisgre
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.

__________________
Dawn
X-Cart Business 5.3.6.3
Mods:
Qty input - Custom Mod
Part numbers near title - Custom Mod
Membership approval before ordering - Custom Mod
Order Forms - Custom Mod
Freight on Board - Custom Mod
Catalog Order Form
Call For Price
Template: Crisp White skin
Running on Windows
Reply With Quote