banditbirds Posted May 30, 2016 Share Posted May 30, 2016 Hi all, Does anyone know how I can generate a url link to a specific customer in the back office? I have a module which has the customer id. How can I get a url with a token? Looking at the order page in the back office, I can see it generates the url: http://www.banditbirds.co.uk/adminbirds/index.php?tab=AdminCustomers&id_customer=3&viewcustomer&token=[token number] Any ideas? Thanks! Simon Link to comment Share on other sites More sharing options...
roja45 Posted May 31, 2016 Share Posted May 31, 2016 $this->context->link->getAdminLink('AdminCustomers', true) you can append the rest 1 Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2016 Share Posted June 1, 2016 example of code to get url to customer edit page $this->context->link->getAdminLink('AdminCustomers', true)."&id_customer=4&updatecustomer" 2 1 Link to comment Share on other sites More sharing options...
banditbirds Posted June 4, 2016 Author Share Posted June 4, 2016 Thank you @vekia and @roja45!! Link to comment Share on other sites More sharing options...
banditbirds Posted June 4, 2016 Author Share Posted June 4, 2016 example of code to get url to customer edit page $this->context->link->getAdminLink('AdminCustomers', true)."&id_customer=4&updatecustomer" I can't seem to get this to work in the <a href""> <a href="{$this->context->link->getAdminLink('AdminCustomers', true)}&id_customer=4&updatecustomer">{$quotes[nr].quote_user_id|escape:'htmlall':'UTF-8'}</a> I originally tried: <a href="http://www.banditbirds.co.uk/adminbirds/index.php?tab=AdminCustomers&id_customer={$quotes[nr].quote_user_id}&updatecustomer">{$quotes[nr].quote_user_id|escape:'htmlall':'UTF-8'}</a> But this gives an error about Invalid Security Token?? Does your suggestion solve this? (if I can get the syntax right...) Link to comment Share on other sites More sharing options...
banditbirds Posted June 6, 2016 Author Share Posted June 6, 2016 This is the error I get: 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