-->

prestashop 1.7 how to edit the “add product” page

2019-07-24 05:58发布

问题:

I am trying without any success, to edit the page in the subject, because I have added 7 more fields in the product table that I would like to manage in the backoffice.

I have seen that the 1.6 version of Prestoshop had a specific view for that page and that it was pretty simple to add fields to the form. As to the 1.7 I'm going literally crazy, because I cannot find any view that manages the "add product" page.

Any hint? I know that it could probably have something to do with the introduction of Symfony in Prestashop, but I don't get how.

Thanks

EDIT

Solution found here. Great answer: https://stackoverflow.com/a/44861846/1873501

回答1:

Actually it is related to the Symfony / Twig part, like Module admin controllers, so you have to take a look here : /src/PrestaShopBundle/Form/Admin/Product

Best way to debug this part is to use debug mode on 1.7 with Symfony bar, you can track what is happening with Twig !

All bundles are stored in ./src/ like in a classic Symfony installation.

Edit : A better way to achieve things would actually to make a module (https://validator.prestashop.com/generator) with displayAdminProductsExtra hook !