giwrgos88 Posted March 14, 2018 Share Posted March 14, 2018 Hello, I'm writing a module that it will add an extra tab on the edit product page (back office). I did a small research and I saw many people that they are suggesting the following methos Tools::getAdminTokenLite('AdminModules') $token = Tools::getAdminToken($tab.(int)(Tab::getIdFromClassName($tab)).(int)($cookie->id_employee)); 'token' => Tools::getToken(false) I did several combinations, like changing tabs, module names etc, but non of them returned the same token that exist on the URL. Does anyone know what method to use in order to get the same token on my tbl with the one on the URL? Also how I can build a friendly url on the smarty? Now it is index.php?controller=AdminProducts&token={$token|escape:'html':'UTF-8'}" And i need something like this index.php/product/catalog?_token= Thanks Link to comment Share on other sites More sharing options...
leakimd Posted January 10, 2020 Share Posted January 10, 2020 Do you find an answord ??? I have same probleme Link to comment Share on other sites More sharing options...
aniso Posted June 16, 2021 Share Posted June 16, 2021 in Backoffice some time you need juste the current user id to generate the token ?token='.Tools::getAdminToken((int) $this->context->employee->id) 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