mayah Posted August 21, 2017 Share Posted August 21, 2017 Hello, I need help with Prestashop 1.6 and will appreciate any answers, thank you! I need to show prices only to logged in users AND inform them that the need to log in on product page and product lists. What I've done: 1) Disabled price showing for visitors and guests; 2) Put this function in product.tpl and product-list.tpl where I want it to appear: {if !$logged} <p>Notice: Please <a href="/login">log in</a> to see the prices</p> {/if} Everything works fine, but the problem is that when user is logged in, this message is still showing. I need it to be hidden or simply not displayed when user is logged in. What did I do wrong? Thank you so much. P.S. I am very sorry that this is a duplicate post. I think I chose wrong forum part before, therefore I repost this. Link to comment Share on other sites More sharing options...
BalzoT Posted August 21, 2017 Share Posted August 21, 2017 Hi I think the correct variable is $is_logged, so the code should be {if !$is_logged} <p>Notice: Please <a href="/login">log in</a> to see the prices</p> {/if} Link to comment Share on other sites More sharing options...
mayah Posted August 21, 2017 Author Share Posted August 21, 2017 Hi I think the correct variable is $is_logged, so the code should be {if !$is_logged} <p>Notice: Please <a href="/login">log in</a> to see the prices</p> {/if} Thank you so much, it worked! Thank you! 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