krifur
krifur

Reputation: 890

How to hide the "add to cart" button magento

the question seems a litle bit strange, but I wonder if there's an easy solution to hide the add to cart button cause I would like to display a showroom of the products without anything, the add to cart button will only appears after an user event (select a store in a module in that case) any good tricks to realize that ?

For now I'm thinking a session boolean variable set if the user has check which store he'll be linked to, perhaps there's something better ?

Thx

Upvotes: 0

Views: 874

Answers (1)

ʍǝɥʇɐɯ
ʍǝɥʇɐɯ

Reputation: 4022

I am intrigued now as to how this is going to look! As mentioned earlier you can have your store selection stored as a cookie to give some persistence, in that way the site visitor can think and reflect about a purchase and not go through hoops next time they sign in.

If the cookie is not present you could put this in the end of your template to hide the buttons:

if(getCookie('yourstorecookie')==NULL) $$('.add-to-cart').setStyle({display:'none'});

Upvotes: 2

Related Questions