.js 文件修改不适用于 ocmod opencart
.js file modification not working with ocmod opencart
<file path="catalog/view/javascript/common.js">
<operation>
<search><![CDATA['add': function(product_id, quantity) {]]></search>
<add position="replace">
<![CDATA['add': function(product_id, m, quantity) {
alert('ok');
quantity = m*quantity;
]]>
</add>
</operation>
这是我的 xml 我也没有在 ocmod.log 中出错,请帮忙
您不能使用 ocmod 或 vqmod 修改客户端文件:
css & js files - These files are rendered at the browser level, not at
the server level, so vQmod has no effect on these. You can, however,
create new files and use vQmod to alter the tpl files to point to
these new css/js files. Or you can put <style>
and <script>
tags
directly into the tpl file using vQmod.
<file path="catalog/view/javascript/common.js">
<operation>
<search><![CDATA['add': function(product_id, quantity) {]]></search>
<add position="replace">
<![CDATA['add': function(product_id, m, quantity) {
alert('ok');
quantity = m*quantity;
]]>
</add>
</operation>
这是我的 xml 我也没有在 ocmod.log 中出错,请帮忙
您不能使用 ocmod 或 vqmod 修改客户端文件:
css & js files - These files are rendered at the browser level, not at the server level, so vQmod has no effect on these. You can, however, create new files and use vQmod to alter the tpl files to point to these new css/js files. Or you can put
<style>
and<script>
tags directly into the tpl file using vQmod.