覆盖替换模块 tpl 文件

use*_*494 1 overriding prestashop

我无法覆盖 prestashop 上的模板模块 tpl。我已将新的 tpl 文件放入主题/模块中,尝试覆盖 prestashop 文件夹,但不起作用。清除缓存没有变化。

小智 5

要覆盖模块 tpl,您必须将文件夹结构和要覆盖的文件复制到主题中。

例如,如果您想修改模块modulename的front.tpl并且您有一个名为yourthemename的主题

你必须复制:

/modules/modulename/views/templates/hook/front.tpl

/themes/yourthemename/modules/modulename/views/templates/hook/front.tpl

请注意,文件夹可能会有所不同,但您必须保持结构。

复制文件后,您可以对其进行编辑,它将替换 tpl 的内容