无法覆盖prestashop中模块中的类文件 [英] can't override class file in module in prestashop

查看:81
本文介绍了无法覆盖prestashop中模块中的类文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我的模块覆盖class(Product.php)文件.如果我将其放在root/override/classes/Product.php中,则它可以正常工作.

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.

但是我想将其放在modules/my_module/override/classes/Product.php中

But I want to put it in modules/my_module/override/classes/Product.php

然后它对我不起作用.

如果有人这样做,请告诉我该怎么做?

If anyone done something like this then please let me know how can I do that ?

谢谢.

推荐答案

您放置文件的位置是正确的位置.请注意,在安装模块之前,文件必须已经存在.在安装后将其放到那里将无济于事,因为在安装过程中,来自modules/my_module/override/classes/的文件被复制为override/classs.

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.

这篇关于无法覆盖prestashop中模块中的类文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆