Shellanza Posted June 7, 2016 Share Posted June 7, 2016 Very easy to think but an hell to do. Actually I have my list of links on my footer. I need to print a link in the case the user is a normal user and another link if the user is a user with a different group. I already have the script in .TPL to manage but this footer data are written on database... hd_config exactly So actually I can't run php neither play with TPL. What I can do? :-( Link to comment Share on other sites More sharing options...
buhoplace Posted June 7, 2016 Share Posted June 7, 2016 (edited) You can do some like this; in FrontController, in init function, add: if(!$this->context->customer->isLogged()){ $customer=null; }else{ $customer = new Customer($this->context->customer->id); } then, add $customer to context. customer group: $customer->id_default_group; in your tpl, do a if conditional with this var, with {$link} var (link object) you can get the links you need ( {$link->getCategoryLink(1)} example, check class Link methods ) Is this what you need? Edited June 7, 2016 by buhoplace (see edit history) Link to comment Share on other sites More sharing options...
Shellanza Posted June 7, 2016 Author Share Posted June 7, 2016 (edited) Thanks, I will try tomorrow and let you know! Just worried because I see no TPL... I see the footer contents in the Mysql table... hd_config. Thanks you anyway, I let you know! Edited June 7, 2016 by Shellanza (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