我想在 opencart 2.0.3.1 中使用 ocmode 添加脚本。
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Save and Continue Button in Settings-Category-Product-All Module</name>
<code>save_continue</code>
<version>2.0.3.1</version>
<author>CBA</author>
<link>http://example.com</link>
<file path="admin/view/template/module/account.tpl">
<operation>
<search index='1' trim='true'><![CDATA[
</form>
]]></search>
<add position="after" trim="true"><![CDATA[
<script>var user_id = $('form').attr('id');
$('[type="submit"]').attr('form',user_id);
$('.fa-reply').after('<button type="button" data-toggle="tooltip" title="Save and Continue" class="btn btn-default" onclick="$(my_id).attr('action', '<?php echo $action; ?>&save_continue=1').submit()"><i class="fa fa-repeat"></i></button>');
</script>
]]></add>
</operation>
现在我将此文件保存为 test.ocmode.xml 并从 Extension Installer 上传。但不起作用