在Opencart 2.0 OCMod中,修改后的文件不用于视图

时间:2014-11-05 17:04:21

标签: php opencart vqmod opencart2.x

我已在godaddy域的子目录下部署了一个示例Opencart2.0。我创建了一个OCMod xml文件remove_unused_desc_from_category.ocmod.xml,该文件从<sub_dir>/catalog/view/theme/default/template/product/category.tpl中删除了一行

我已使用Extension Installer安装了它并刷新了缓存。然后检查了具有更改的新文件<sub_dir>/system/modification/catalog/view/theme/default/template/product/category.tpl

但它仍然没有影响用户界面。我还是opencart和OCMod的学习者。请帮助。

1 个答案:

答案 0 :(得分:3)

我在Opencart github repo here中提出了同样的问题,并找到了解决方案。

  

如果您使用自动安装程序安装了opencart,则migth已将DIR_CATALOG添加到您的root config.php,您必须对其进行编辑并将其删除,它不应该存在。并将其值直接移至DIR_APPLICATION。 - florinsith

代码:

//define('DIR_CATALOG', '/home/<user_dir>/public_html/<sub_dir>/catalog/');
//define('DIR_APPLICATION', DIR_CATALOG);
define('DIR_APPLICATION', '/home/<user_dir>/public_html/<sub_dir>/catalog/');