![]() |
Hide add-to-cart button if price = 0.00
Can anyone help me. I want to hide the add-to-cart button on the product pages if the price is shown as 0.00. Site is RGM (see signature)
Version concerned is 4.4.3. Many thanks. Denis. |
Re: Hide add-to-cart button if price = 0.00
Start by finding the template product_details.tpl in customer/main in your skin folder.
Then look for the code that displays the button, e.g. {include file="customer/buttons/add_to_cart.tpl" type="input" additional_button_class="main-button"} Then surround that code with an if statement to determine if the price is 0. {if $product.taxed_price ne 0} {/if} The button will then only show if the product has a price above 0. |
Re: Hide add-to-cart button if price = 0.00
Many thanks Paul. I thought that was what I had typed in the first place but copy and paste of your text worked fine while mine didn't. Thank you so much.
Denis. |
Re: Hide add-to-cart button if price = 0.00
Is it possible to hide the add-to-cart button when the price=0 by using the custom CSS? I'd rather not dig into the php code.
|
Re: Hide add-to-cart button if price = 0.00
Are you using X-Cart 5?
This is a version 4 thread. |
Re: Hide add-to-cart button if price = 0.00
oops, sorry. will post on the proper forum
|
All times are GMT -8. The time now is 05:26 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.