Jump to content

[SOLVED]Hide buy block when product has attributes


Recommended Posts

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 by pel024 (see edit history)
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

  • 11 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...