grsinternet Posted November 19, 2019 Share Posted November 19, 2019 (edited) I want to add an Edit button next to product name(in product.tpl) for Admin, for directly going to Back-office to edit current product. PrestaShop 1.7 For this I only need to identify or Admin is logged in for Back-Office, but I need to do this in product.tpl, it means I can't use php. How can I do this? Thanks!! Edited November 19, 2019 by grsinternet (see edit history) Link to comment Share on other sites More sharing options...
joomleader Posted November 20, 2019 Share Posted November 20, 2019 you need to overwrite core file to embed token key for admin login , then you will have link to backend with token key Link to comment Share on other sites More sharing options...
grsinternet Posted November 20, 2019 Author Share Posted November 20, 2019 1 hour ago, joomleader said: you need to overwrite core file to embed token key for admin login , then you will have link to backend with token key Token is not needed, because Admin is loged in to Back-Office, so simple link of Product Edit is enough. I have tested and it works, I can see Alert Dialog for secure appearing, but not a problem. So I need to write only simple condition in Product Page at Front-Office to provide that link next to Product Name Link to comment Share on other sites More sharing options...
siomosp Posted October 19, 2021 Share Posted October 19, 2021 Hello! have you find a way to do it? Link to comment Share on other sites More sharing options...
pullidea-dev Posted October 20, 2021 Share Posted October 20, 2021 I'm using Prestashop 1.7.8.0 Use the below link in product.tpl /your_admin_folder_name/index.php/sell/catalog/products/{$product.id} Link to comment Share on other sites More sharing options...
ps8modules Posted October 21, 2021 Share Posted October 21, 2021 On 10/20/2021 at 10:03 AM, raudsepp said: I'm using Prestashop 1.7.8.0 Use the below link in product.tpl /your_admin_folder_name/index.php/sell/catalog/products/{$product.id} I think you're just spamming the forum. Your answer is not to the question "Check admin is signed-in in Front-Office". Link to comment Share on other sites More sharing options...
ps8modules Posted October 21, 2021 Share Posted October 21, 2021 if (Context::getContext()->employee->id == '1') then ..... <a href="url to backoffice/sell/../product/update/543."> ... ... 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