can't override class file in module in prestashop

喜欢而已 提交于 2019-12-10 17:24:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!