X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Hide add-to-cart button if price = 0.00 (https://forum.x-cart.com/showthread.php?t=61432)

denisRGM 11-01-2011 07:26 AM

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.

pauldodman 11-02-2011 01:03 AM

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.

denisRGM 11-02-2011 05:35 AM

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.

Duckworks 11-17-2016 08:53 AM

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.

pauldodman 11-17-2016 08:57 AM

Re: Hide add-to-cart button if price = 0.00
 
Are you using X-Cart 5?
This is a version 4 thread.

Duckworks 11-17-2016 09:31 AM

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.