absailesh / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

Opencart VQmod fatal error when viewing orders. #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hopefully this is the correct area to be posting this issue (and fix) since 
vQmod supports opencart - point me elsewhere if it isn't.

Error Recieved: 
Fatal error: Call to a member function modCheck() on a non-object in [local 
directory]\web\vqmod\vqcache\vq2-system_engine_controller.php on line 56

What steps will reproduce the problem?
1. Going into Opencart admin tool: sales>orders, clicking view on an order
2. My orders were placed through worldpay test orders (but I assume the issue 
is with the orders).
3. Inside web\admin\index.php you will have to enable PHP errors - otherwise 
"Internal Server Error" is returned.

What is the expected output? What do you see instead?
I expected to see the regular orders page and be able to view the details of 
the order. Instead I was confronted with the error above.

vQmod Version:2.X apparently
Server Operating System:Windows OS, running Zend/Apache2
Opencart Version: 1.5.6

Please provide any additional information below.

I have a fix in the VQmod Opencart XML script. In the default vqmod xml scripts 
supplied by the vqmod opencart installation, vqmod_opencart.xml has an error on 
line 19. index needs to be "1,3" rather than "1".

<search position="before" 
index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>

Should instead be

<search position="before" 
index="1,3"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>

As the generated vq2-system_engine_controller.php is missing "global $vqmod;" 
inside the hasAction() function which should be just before/on line 56, which 
this fix does.

I've also attached a fixed (and otherwise unmodified) copy of my 
vqmod_opencart.xml

Cheers.

Original issue reported on code.google.com by cush...@gmail.com on 25 Jul 2014 at 9:52

Attachments:

GoogleCodeExporter commented 9 years ago
That's an old version no longer used. Upgrade to the latest version and it 
doesn't have this problem, or even have $vqmod->

Original comment by DJG6...@gmail.com on 25 Jul 2014 at 9:57

GoogleCodeExporter commented 9 years ago
Ah, thank you. Apologies for the confusion.

Original comment by cush...@gmail.com on 25 Jul 2014 at 10:07

GoogleCodeExporter commented 9 years ago
Hi guys. Thanks for improvement.
What about line 54?
<search position="before" 
index="1"><![CDATA[$vqmod->modCheck($action->getFile()]]></search>

It shouldn't be changed to <search position="before" index=1,3" ....?

Original comment by mant...@gmail.com on 26 Mar 2015 at 8:54