安装我在 prestashop 1.6 中创建的模块时覆盖 my-account.tpl 模板文件,

Override the my-account.tpl template file when install the module that I have created in prestashop 1.6,

我在 prestashop 中创建了一个自定义模块,我只需要在安装模块时覆盖 my-account.tpl 模板文件,我创建的那个模块是自定义的。我不知道该怎么做that.can有人帮我解决这个问题。

试试 :

/* INSTALL */
@copy('../themes/'._THEME_NAME_.'/my-account.tpl','../themes/'._THEME_NAME_.'/my-account.tplback'); //Backup file
@copy('../modules/NOMDUMODULE/my-account.tpl','../themes/'._THEME_NAME_.'/my-account.tpl'); //Install new file

/*DESINSTALL*/
@unlink('../themes/'._THEME_NAME_.'/my-account.tpl'); //Delete file
@copy('../themes/'._THEME_NAME_.'/my-account.tplback','../themes/'._THEME_NAME_.'/my-account.tpl'); //Restor file

此致