Cadmiel Posted March 27, 2017 Share Posted March 27, 2017 Hello, I have a pdf file and a link to the file,in my-account cms page. How can I make that file downloadable only if a user is logged in? Regards! Link to comment Share on other sites More sharing options...
vekia Posted March 27, 2017 Share Posted March 27, 2017 hello how you added this file to the shop ? how you added this file to 'my account' section ? Link to comment Share on other sites More sharing options...
Cadmiel Posted March 27, 2017 Author Share Posted March 27, 2017 hello Vekia, The file is added to the shop and in my-account is something like: <ul class="myaccount-link-list"> {$HOOK_CUSTOMER_ACCOUNT} <li><a href="/documentatii/Catalog-produse.xls"><i class="icon-book"></i><span>Catalog produse</span></a></li> </ul> it works like I wanted but if I had that link i can access it.../documentatii/Catalog-produse.xls.. Link to comment Share on other sites More sharing options...
Cadmiel Posted March 27, 2017 Author Share Posted March 27, 2017 (edited) Nevermind Vekia...I wanted something else and dk how to make that...i want to make that file visible only for a group of registered clients.. Example: I have 116 client groups and those can see the file but normal groups (visitor, guest) can't... Can I make something like that? something like: if(client->group != clientGroupId(2)) show(<li><a href="/documentatii/Catalog-produse.xls"><i class="icon-book"></i><span>Catalog produse</span></a></li>) I don't know how to say it more clear:) Thanks Edited March 27, 2017 by Cadmiel (see edit history) Link to comment Share on other sites More sharing options...
Cadmiel Posted March 27, 2017 Author Share Posted March 27, 2017 I found this: https://www.prestashop.com/forums/topic/114415-solved-whats-the-smarty-variable-for-user-id-and-group-id/ How can I make this? Link to comment Share on other sites More sharing options...
Cadmiel Posted March 28, 2017 Author Share Posted March 28, 2017 I made it Vekia, with {if Group::getCurrent()->id >4} in .tpl file and then i put the link Thanks 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