jef933 Posted October 8, 2020 Share Posted October 8, 2020 Hi everyone ! As you can see , I've difficulties to add a custom field into category admin page. More precisely, i found this hook : hookActionCategoryFormBuilderModifier but i can't register it , like it doesn't exist in prestashop. However i find it on presta documentation. on the other hand actionCustomerFormBuilderModifer works correctly Does anybody have already make this ? could you please help me ... Thanks for your help Link to comment Share on other sites More sharing options...
Verlonimo Posted October 8, 2020 Share Posted October 8, 2020 (edited) Hi, It's because this hook is used for symfony forms. Customer form is already migrated to symfony but category form is not yet. You want to use hookActionCategoryFormModifier hook as for now... Here is the link which explains how to identify is it simfony or not. https://www.h-hennes.fr/blog/2019/07/25/prestashop-1-7-identifier-si-un-controller-admin-a-ete-migre-vers-symfony/ Thanks Edited October 8, 2020 by Verlonimo (see edit history) 1 Link to comment Share on other sites More sharing options...
jef933 Posted October 12, 2020 Author Share Posted October 12, 2020 (edited) Hi , and thx for your answer. Category Form was migrated. I found a part of the problem. This presta was a 1.7.3 upgrade to 1.7.6 and hookActionCategoryFormModifier was not in Db. It was upgraded by Oneclick Module . I had it and i can fix to the hook. But it doesn't work. I think another think is missing but what ... Does anybody have an idea ? Thx a lot. Edited October 12, 2020 by jef933 (see edit history) Link to comment Share on other sites More sharing options...
Verlonimo Posted October 12, 2020 Share Posted October 12, 2020 Hi, My bad. It looks like admin category page is also using symfony. Sorry for misleading... Have you tried to print_r something with that hook? Have you registered that hook in a module? Where i exactly u want to add your custom field? I think this is what you looking for? https://www.h-hennes.fr/blog/2019/08/05/prestashop-1-7-ajouter-des-champs-dans-un-formulaire-dadministration/ It's in french but you can use google translate as i do Hope that helps. Thanks 1 1 Link to comment Share on other sites More sharing options...
jef933 Posted October 12, 2020 Author Share Posted October 12, 2020 (edited) Merci pour ton aide Verlonimo, Le français ne va pas poser problème 😉. Oui print_r() die() rien. J'ai ajouté le hook en bdd et me suis gréffé dessus. Je souhaiterais ajouté des champs sur la page admin des catégories. J'ai testé sur une install propre de presta en 1.7.6 ça fonctionne niquel. Là c'est un presta qui a été migré via le module natif de presta , et à mon avis il doit manquer des choses. Pas facile de trouver. En tout cas merci pour ton aide. Edited October 12, 2020 by jef933 (see edit history) Link to comment Share on other sites More sharing options...
Verlonimo Posted October 12, 2020 Share Posted October 12, 2020 Hi, Sorry, i don't understand French Have you tried to look into my link, where it describes how to add custom field to category page? Thanks Link to comment Share on other sites More sharing options...
jef933 Posted October 13, 2020 Author Share Posted October 13, 2020 Ah Sorry i thought you were french 😃 Yes i see your link , thx for your help. I finally found where was my problem. while i was trying to use the hook i modified my module and it was disabled. Stupid error To sum up: The only problem was that the hookActionFormBuilderModifer was missing in Db. Besides the hookActionAfterUpdateCategoryFormHandler too. probably due to an error during migration. 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