Umashankar Saw
Umashankar Saw

Reputation: 1189

.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>

This is my xml also I do not get error in ocmod.log, please help

Upvotes: 2

Views: 1357

Answers (1)

DigitCart
DigitCart

Reputation: 3000

You can't modify client side files with ocmod or 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.

About vQmod: https://github.com/vqmod/vqmod/wiki/About-vQmod

Upvotes: 5

Related Questions