Jump to content

Recommended Posts

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

Share this post


Link to post
Share on other sites
  • 1 year later...
On 1/10/2020 at 10:36 AM, leakimd said:

Do you find an answord ??? I have same probleme

 

Just  send this  value  to  the template  :


'token'=>Tools::getAdminTokenLite('AdminProducts'),

 

Share this post


Link to post
Share on other sites
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More