pl.sabotinov Posted May 22 Share Posted May 22 Hello everybody, I am developing one website with PS 8.1.4 and created simple module, where from the views folder i want to make some small change of the {form.combination.html.twig} and {form.combinations.html.twig} templates in the Backoffice Product ->Combinations page. Actually i have done it several times with Prestashop 1.7.7. with no problems. Now i have made the changes and uploaded the files in the correct folder in my module views->PrestaShop->Admin->Product->ProductPage->Forms but nothing happened - have checked everything - nope there was no change in BO->Product_>Combinations So i decided to make direct override of the files - just for Test - in the src->PrestaShopBundle->Resources->views->Admin->Product->ProductPage->Forms I uploaded the overriden files - change the original files names - change my files to the correct names and tested again the update - once again nothing??? My changes are very simple - just added several lines of code - Label with one value. But still nothing. I even have commented some of the other code - some other lines and changed one label from the original code to see what is going on. But still no change - everything remains the same in BO->Product->Combinations. Of course i decided to clear the cache in Advanced Parameters, after that force compile of templates and for being sure deleted and created again the class_index file in var->cache->prod and var->cache->dev. But still not a single change i have applied. After that went to advanced parameters again - enabled/disabled shop. Disabled and enabled the Debug mode, disabled smarty cache - but stil not a single change. Also cleared the cache in the browser where i am opening the BO. So I am really confused what is going on. I know these files , as i said i have made this kind of change already. But now I am stucked with this problem and do not know what to do. Is there some caching problem in this Prestahop version 8.1.4 - some other file that i have to clear or regenerate for solving this? Please help if I have missed something to do. I am really confused what is happening. Regards, Link to comment Share on other sites More sharing options...
pl.sabotinov Posted May 23 Author Share Posted May 23 Hello again, what I have done today is to clear the content of var/cache folder (prod and dev folders) after that i have cleared the cache in advanced parameters and refreshed browser in BO. Still not any change. As a total approach I just have renamed these two forms - form.combination.html.twig and form.combinations.html.twig so these forms could not be accessed. After that cleared the content in var/cache folder and cleared cache - still the same not any change. PS should not open this view at all and create some error - but it generates the form and everything works like the files are there. I really can not understand what is going on here. Waiting for some suggestion. Link to comment Share on other sites More sharing options...
pl.sabotinov Posted July 25 Author Share Posted July 25 Hello, will write some answer to my question just for anybody who needs this information, cause it seems nobody wants to point to the answer. Actually there is totally new apporoach for building the forms in the admin (BO) views. The forms are generetad by forrmBuilderModifier class and for extending some form we have to create module. This module registers to a hook that is connected to build this form (the form we want to change) and in separate class we have to append (addAfter()) our fields to the main Form or Subform. And register this class as a service in config folder. Here the links to the docs where this is described. Also to a demoproductform (2) - two modules as an example: https://devdocs.prestashop-project.org/8/modules/sample-modules/extend-product-page/ https://github.com/PrestaShop/example-modules/tree/master/demoproductform It is also interesting why in the documntation of the PS 8 stays still this old way to override the Back Office views - which is already fully not applicable: https://devdocs.prestashop-project.org/8/modules/concepts/templating/admin-views/ I hope i could help somebody and point quickly to the procedure of changing the BO form. regards, 1 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