pel024 Posted August 18, 2012 Share Posted August 18, 2012 (edited) Hi all, Does anyone know how to hide the buy block (on product.tpl) when a product has attributes. The reason I need this is that I have a module which displays the attributes in a table with an add to cart button, so there's no need for it. But I have other products that don't have attributes so obviously it needs to be displayed with these. Cheers Edited August 18, 2012 by pel024 (see edit history) Link to comment Share on other sites More sharing options...
Médéric Posted August 18, 2012 Share Posted August 18, 2012 Hi, On the product.tpl line 227 themes 1.4.8 replace : <form id="buy_block" {if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post"> with : <form id="buy_block" {if $PS_CATALOG_MODE AND $product->quantity > 0 OR isset($groups)}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post"> I think it will be good ! Best regards 1 Link to comment Share on other sites More sharing options...
pel024 Posted August 18, 2012 Author Share Posted August 18, 2012 Works perfectly, cheers. Link to comment Share on other sites More sharing options...
shacker Posted August 18, 2012 Share Posted August 18, 2012 you can do in preferences, product Display "add to cart" button when product has attributes: Link to comment Share on other sites More sharing options...
kugi Posted August 21, 2012 Share Posted August 21, 2012 Nice tip, thanks Mederic I also needed this 1 Link to comment Share on other sites More sharing options...
mascotasavila Posted August 7, 2013 Share Posted August 7, 2013 Hi pel024, i¡m looking for a module which displays the attributes in a table with an add to cart button, can you tell me what module use you? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now