Altex Posted November 18, 2008 Share Posted November 18, 2008 HeyIs 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 More sharing options...
Beve Jates Posted November 18, 2008 Share Posted November 18, 2008 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 More sharing options...
Altex Posted November 18, 2008 Author Share Posted November 18, 2008 Ye si know i can hide the button in the product_list, but i wonder if there is a way to hide it only on those products having Attributes set. Link to comment Share on other sites More sharing options...
Altex Posted November 24, 2008 Author Share Posted November 24, 2008 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 More sharing options...
Mattias Johansson Posted November 26, 2008 Share Posted November 26, 2008 If it is possible to make the Add to cart button non clickable when products are out of stock it would be possible when combinations are present. And i only need to hide or make it non clickable in the product list. No need to hide it on product page. Link to comment Share on other sites More sharing options...
Duffman Posted December 30, 2009 Share Posted December 30, 2009 Hi therei 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.tplSearch 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 More sharing options...
Recommended Posts