paoltaia Posted December 7, 2010 Share Posted December 7, 2010 Hi all,I was wondering if someone could help me with this:I'd like to disable the ADD TO CART button to all unregistered visitors so that they have first to register and log in before actually adding any product to the cart. Is this possibile?Thanks in advance! Paolo Link to comment Share on other sites More sharing options...
olea Posted December 7, 2010 Share Posted December 7, 2010 Yes it's possible.In the TPL files, you have to use the statement {if $logged} .... {/if} The tpl code between these 2 lines will be displayed only if customer is logged. Link to comment Share on other sites More sharing options...
3rtt Posted January 6, 2011 Share Posted January 6, 2011 Which tpl files...all of them? Or just specific one/s? And where in the file should this code be placed? Link to comment Share on other sites More sharing options...
rocky Posted January 7, 2011 Share Posted January 7, 2011 All of the ones with "Add to cart" buttons. It is product.tpl, product-list.tpl and module templates too depending on which ones you have installed. Link to comment Share on other sites More sharing options...
3rtt Posted January 7, 2011 Share Posted January 7, 2011 All of the ones with "Add to cart" buttons. It is product.tpl, product-list.tpl and module templates too depending on which ones you have installed. Thanks for the info. I had found the correct files and placed the code in the right spots, but after refreshing the page, the entire center and right columns would disappear. I subsequently found that I also needed to add a line of code to the product.php file, then everything reappeared and the add cart button had the behavior I was looking for. Regards Jim 1 Link to comment Share on other sites More sharing options...
giulomas Posted January 23, 2016 Share Posted January 23, 2016 Any chance to know how you had solved? Which code is the right code? 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