Jump to content

How to get admin product token on smarty


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

Link to comment
Share on other sites

  • 1 year later...
  • 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...