steviger Posted July 29, 2014 Share Posted July 29, 2014 (edited) Hi, I would like to hide the "add to cart button" for non logged in visitors. So that they're not able to purchase any products. However they must be able to see the price. I found this in the forum but that's not for version 1.6:http://www.prestashop.com/forums/topic/85872-solved-hide-add-to-cart-button-until-logged-in/ Any ideas on how to solve this in V 1.6? Cheers, Steven Edited July 30, 2014 by steviger (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted July 30, 2014 Share Posted July 30, 2014 This should be the php var $this->context->customer->isLogged() But it won't work in templates, you need to assign it somewhere. You might create a custom module that hooks to the header, so it's available on all the page Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2014 Share Posted July 30, 2014 at the moment prestashop hasn't got feature to "hide" add to cart button, you can only change group settings, but it will hide not only add to cart button, but only the price i think, that with little modification on product-list.tpl and product.tpl it will be possible but what with other modules where price of product appears? Link to comment Share on other sites More sharing options...
steviger Posted July 30, 2014 Author Share Posted July 30, 2014 (edited) Hi Guys, Thanks for the reply. Disable only on product-list.tpl and product.tpl will be just fine. So I guess I have to put the var $this->context->customer->isLogged() somewhere (in which file?) and modify the 2 tpl files (exactly how ?) right? Your help is much appreciated! Cheers I found this solution: http://catalogo-onlinersi.net/en/add-ons-prestashop-modules/328-hide-price-and-add-to-cart.html Works fine for me:) Edited July 30, 2014 by steviger (see edit history) 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