NicolasIT Posted September 5, 2017 Share Posted September 5, 2017 (edited) Ehy there, We're talking about Prestashop 1.7.2.1 I was able to edit Order table adding or removing columns i didn't need [FE removed new customer and added email] but i'm experiencing some problems on product page maybe becouse it's symphony and i still don't feel confortable with it. I'd like to remove ID field the "pen" you can see on the image i attached [there's no difference by clicking on the "pen" or the name of the product if i remove the pen i save space] and i'd like to add EAN field mixing name and description search on "name" field so i could search the name or some words of description in that field to find faster some products How can i achieve this? i guess last bullet point is not possible but i asked it anyway thanks, NicholasIT Edited September 5, 2017 by NicolasIT (see edit history) Link to comment Share on other sites More sharing options...
AmigaINC Posted September 16, 2017 Share Posted September 16, 2017 Hello, inded there is a way, but you need to edit PS core... (if anyone knows how to override Symfony bundles...) Files involved: /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/catalog.html.twig /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/list.html.twig However, I'm in the same case of you, I don't find where to display EAN13... Since I have any information, I'll update this post. Regards, Link to comment Share on other sites More sharing options...
edogusma Posted November 2, 2017 Share Posted November 2, 2017 (edited) You can also use standard override behavior using: /override/controllers/admin/AdminProductsController.php then you need to update admin URL from legacy back-office/index.php/product/catalog.... to current /back-office/index.php?controller=AdminProducts...; to do so just override class Link.php in: /override/classes/Link.php You can use attached files to recreate standard view. Just place them in corresponding folders. AdminProductsController.php Link.php Edited November 8, 2017 by edogusma (see edit history) Link to comment Share on other sites More sharing options...
hhennes Posted November 16, 2017 Share Posted November 16, 2017 Hello, I was facing the same problem ( I want to add a manufacturer column in product list ) I have found a solution but as AmigaINC said it is necessary to edit some prestashop core file. You can find the tutorial about this (in french ) : https://www.h-hennes.fr/blog/2017/11/15/prestashop-1-7-ajouter-des-champs-dans-le-listing-produit-admin/ Regards, Hervé Link to comment Share on other sites More sharing options...
edogusma Posted November 17, 2017 Share Posted November 17, 2017 Up to you, Hervé, but editing core files is always a risk... Link to comment Share on other sites More sharing options...
hhennes Posted November 20, 2017 Share Posted November 20, 2017 On 17/11/2017 at 11:03 AM, edogusma said: Up to you, Hervé, but editing core files is always a risk... I totaly agree with you on this point ;-) But in the case you want to use the new infrastructure page there is no other choice.. for now. I've seen that it will be corrected in the next PS release : https://github.com/PrestaShop/PrestaShop/pull/8342 Link to comment Share on other sites More sharing options...
Pierre_d Posted November 20, 2017 Share Posted November 20, 2017 Can't you use hooks ? Link to comment Share on other sites More sharing options...
hhennes Posted November 21, 2017 Share Posted November 21, 2017 Nope, there is no hook in the twig files as you can see in the original files : - https://github.com/PrestaShop/PrestaShop/blob/1.7.2.x/src/PrestaShopBundle/Resources/views/Admin/Product/list.html.twig - https://github.com/PrestaShop/PrestaShop/blob/1.7.2.x/src/PrestaShopBundle/Resources/views/Admin/Product/catalog.html.twig Link to comment Share on other sites More sharing options...
hhennes Posted March 27, 2018 Share Posted March 27, 2018 Hello, The article have been updated as starting from ps 1.7.3 it is now possible to override twig templates :-) Regards, Link to comment Share on other sites More sharing options...
shon Posted June 21, 2019 Share Posted June 21, 2019 (edited) Hello everyone, I'm trying to edit the file: form_categories.html.twig in the folder: yoursite / src / PrestaShopBundle / Resources / views / Admin / Product / ProductPage / Forms / Since I would like to hide some code from some employees, I set an if using the context: {% if (int)Context::getContext()->employee->id_profile != 6 %} the problem is that the vairable context does not recognize me. Unexpected token "name" of value "Context" ("end of statement block" expected). Could anyone help me? Thanks to those who will respond. Edited June 21, 2019 by shon (see edit history) Link to comment Share on other sites More sharing options...
shon Posted June 26, 2019 Share Posted June 26, 2019 Can anyone help me? Link to comment Share on other sites More sharing options...
Johack_ Posted October 14, 2020 Share Posted October 14, 2020 On 9/16/2017 at 10:37 AM, AmigaINC said: Hello, inded there is a way, but you need to edit PS core... (if anyone knows how to override Symfony bundles...) Files involved: /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/catalog.html.twig /src/PrestaShopBundle/Resources/views/Admin/Catalog/Product/list.html.twig However, I'm in the same case of you, I don't find where to display EAN13... Since I have any information, I'll update this post. Regards, Where is the search query located? 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