问题描述
Am使用我的模块重写类和控制器.但是,在卸载时,并没有删除使用此模块创建的替代文件夹中的替代文件.因此,在尝试第二次安装时收到错误消息无法安装替代:类CartOverrideOriginal不存在".有人可以帮助我,如何在卸载模块本身而不是手动卸载时删除这些文件.我是否需要编写任何函数来实现此目的?
Am overriding the classes and controllers using my module. But when uninstalling it didn't remove the override files in override folder which are created using this module. because of this am getting an error "Unable to install override: Class CartOverrideOriginal does not exist" when am trying to install second time. can anyone help me, how to remove those files when uninstalling the module itself and not manually.. Do I need to write any function to achieve this?
推荐答案
请注意,模块安装/卸载不应在类和覆盖文件夹中创建或删除文件.这些文件夹包含重要文件,并且偶然地可能导致删除重要文件.因此,如果您的模块需要覆盖某些类或控制器,则不要以编程方式将这些文件放在覆盖文件夹中.您的模块安装说明应告诉用户手动复制这些文件,并进行相同的卸载.
Please note that modules installation/uninstallation should be not creating or deleting files from classes and override folders. These folders has important files and accidentally it can cause to delete important files.So if your module needs to override some classes or controllers, then don't place those files programmatically in override folders. Your module installation instruction should tell the user to copy those files manually and the same for uninstallation.
希望这会对您有所帮助.
Hope this will help you.
谢谢.
这篇关于在prestashop中卸载模块时如何删除override?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!