Jump to content

Get adminProductLink


Chill_user
 Share

Recommended Posts

Hello to all,

I am wondering how to get backoffice product link with the token?

Something like ::getAdminProductLink($id_product) wich redirects to the backoffice product page.

Any suggestions?

 

P.S. getAdminTokenLite and getAdminToken are not the same tokens in this link

Share this post


Link to post
Share on other sites

Or tray this solution, change only name of admin panel (adminPanelName).

$productLink  = _PS_BASE_URL_.__PS_BASE_URI__."adminPanelName/";
$productLink .= 'index.php?controller=AdminProducts';
$productLink .= '&token='.Tools::getAdminTokenLite('AdminProducts');
$productLink .= '&id_product='.(int) Tools::getvalue('id_product');
$productLink .= '&updateproduct&key_tab=Images&action=Images';

$this->context->smarty->assign(array(
    'editLink' => $productLink
));

 

Edited by graficzny.chlopak (see edit history)

Share this post


Link to post
Share on other sites

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
 Share

×
×
  • Create New...

Important Information

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