Jump to content

Hide "Add to cart" button


Recommended Posts

Hey

Is there any way to hide "Add to cart" button on the product list in those cases when there are Attributes present.

What i mean is that the customer wont be able to add the product to the cart before he chose the right color/size etc.

/Mattias

Link to comment
Share on other sites

Hi,

I just can tell you to edit the corresponding button lines in the product.tpl and/or the product_list.tpl.
But it will not give you the ability to show your customers an "Add to cart" button after having made choices.
By that manner, you'll just be able to show the button or not.
You'll have to wait the answer from a php specialist!

Link to comment
Share on other sites

One solution could be to let the main product NOT count the combinations total quantity, and set it to Zero. Then you would be able to set the "When out of stock message" to "Product contains combinations" or something like that.

Anyone know where to change this?

Link to comment
Share on other sites

  • 1 year later...

Hi there
i have found a hack that will allow you to hide the 'add to cart' button on the product list page, so that users have to go to the product page and pick an attribute before they can add to the cart.

I have found the hack here (http://prestashoptuto.wordpress.com/2009/11/30/modifications-theme-prestashop/) and it worked perfect on my version 1.2.5.
Here is an extract:
_____________________
Go to file : /themes/your theme/ product-list.tpl

Search and delete the following lines :

{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
{else}
{l s='Add to cart'}
{/if}

Off course, keep a backup of your 'product-list.tpl' to be able to switch quickly if the hack failed. Good luck.

Link to comment
Share on other sites

×
×
  • Create New...