Jump to content

Get adminProductLink


Chill_user

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

Link to comment
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)
  • Like 1
Link to comment
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
×
×
  • Create New...