我想使用VQMod在页脚文件中添加一些内容,我的XML文件有以下内容,但它不起作用
<code>
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>VQMOD CODE test data</id>
<version>1.0</version>
<vqmver>2.0.1</vqmver>
<author>authore name</author>
<file name="catalog/view/theme/default/template/common/footer.tpl">
<operation error="skip">
<search position="after"><![CDATA[
</footer>
]]></search>
<add><![CDATA[
this is test content
]]></add>
</operation>
</file>
</modification>
</code>
您的opencart版本是什么?它取决于你的footer.tpl内容。您需要确保</footer>
在footer.tpl 中可用
此外,您还需要在vqmod/logs
中查看错误日志。
您能告诉我在默认的opencart主题之上是否应用了任何自定义主题吗?
编辑:试试这个代码,它会为你工作。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE modification [
<!ENTITY adminFolder "admin">
<!ENTITY themeFolder "default">
]>
<modification>
<version>1.0</version>
<vqmver>2.X</vqmver>
<author>umesh</author>
<file name="catalog/view/theme/&themeFolder;/template/common/footer.tpl">
<operation info="To add custom data at footer">
<search position="after" ><![CDATA[
</footer>
]]></search>
<add><![CDATA[
test content
]]></add>
</operation>
</file>