Question

I'm trying to write my vqmod .xml, but nothing to work? if I try to add change in all catalog/* files. It works good for other (system/*, admin/*) files, but nothing changes? if I try to do something like this:

<file name="catalog/controller/checkout/cart.php">
    <operation>
        <search position="replace"><![CDATA[
      $json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
      ]]></search>
        <add trim="true"><![CDATA[
      $json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
      ]]></add>
    </operation>
</file>

what am I doing wrong?

Was it helpful?

Solution

Things to try:

  1. Check whether vqmod is installed by calling https://domain.com/vqmod/install in browser. If not installed, then install and check.
  2. Verify file name and path, also confirm that the code in search tag exists in the file mentioned.
  3. Check folder permissions. Make sure that vqmod/vqcache and vqmod/logs have 755 or 777 permission. If nothing works, then try 777 permission recursively for vqmod folder.
  4. Check the error logs in vqmod/logs.
  5. Check the installed vqmod version and the vqmod version given in xml file (<vqmver><![CDATA[version]]></vqmver>), both need to be the same.
  6. Delete the files in vqmod/vqcache and check again. Also see whether vqmod copy of your file is generated or not.
  7. Move any vqmod xml file outside the vqmod folder and check. If everything works, move the xml back to the vqmod folder. I don’t know the reason, but it worked for me in some cases :) !
  8. <?xml version=”1.0″ encoding=”UTF-8″?> – put this line at the top of the XML to make it valid and more compatible.
  9. Try the VQMod Manager extension. It may help you!

Reference url: Opencart: Vqmod tutorial

OTHER TIPS

Assuming the search can be found, you're not doing anything wrong. However, if it's only the catalog side that is having an issue, then it's most likely your opencart index.php for the catalog side doesn't have vQmod installed whereas the admin side does. Check your index.php file is correct. If that is written, then clear your vqcache folder to ensure it's actually writeable

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top