问题
I want to override class(Product.php) file using my module. If i put it in root/override/classes/Product.php then it is working.
But I want to put it in modules/my_module/override/classes/Product.php
Then it is not working for me.
If anyone done something like this then please let me know how can I do that ?
Thanks.
回答1:
The location that you put the file is the correct one. Note that the file must be there before you install the module. Putting it there after it's installed will do nothing, because the files from modules/my_module/override/classes/ are copied to override/classes during the installation process.
回答2:
as @PrestaShopDeveloper answer the file should copy in override/classes so note directory permision for create a file , a fast but not recommended way is set directory permision of project to 777 and install your module
来源:https://stackoverflow.com/questions/24096731/cant-override-class-file-in-module-in-prestashop