0

I'm using vQmod 2.5.1 and Opencart 2.0.3.1, and I've run into an interesting problem.

I've got a vQmod xml that makes some modifications to the system/library/cart.php file. Here's an example:

<file name="system/library/cart.php">
    <operation>
       <search position="after"><![CDATA[private $data]]></search>
       <add><![CDATA[private $cr_prices = false;]]></add>
    </operation>
</file>

I've placed this file in vQmod's xml directory and am not using OCmod at all for this. It was fine at first, but later I had to refresh Opencart's modification cache for another xml that uses OCmod, and suddenly my entire page broke.

It turns out OCmod created a copy of system/library/cart.php using the modifications from my vQmod xml, and then vQmod made a modification of that file, duplicating all the modifications. So the above modification created these two lines:

private $cr_prices = false;
private $cr_prices = false;

And I got a PHP error about redeclaring class properties.

Anyone run into this problem before or know how to fix it? Why is OCmod applying changes that are in the vqmod/xml directory?

1 Answer 1

0

Heh, after hours of pouring through the core code turns out this wasn't really a problem with vQmod nor with OCmod themselves, but with an extension I used to install vQmod. I completely forgot I had installed vQmod using this extension...

I have uninstalled the extension and have installed vQmod via the official tutorial:

https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart

Now things are working as they should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.