Inane Coding Go on, slap that wayward code

31Aug/130

Using Piwik OpenCart eCommerce mod with Mijoshop

I recently got a query from Chris Flanagan at Siteease about using my Piwik Opencart eCommerce VQmod with Mijoshop (3rd party shopping cart software based on OpenCart). It seemed an interesting problem so I dived in....

After much too-ing and fro-ing we got it to work - So Im here to pass on the knowledge to anyone who may want a Mijoshop Piwik Ecommerce analytics mod. Mid-way through Chris wrote a blog post with lots of useful info - http://blog.siteease.co.uk/opencart-joomla-mijoshop-piwik-analytics/  - however this is now slightly out of date, but he has pinky promised to write a follow-up! P.S. Dont follow the advice to manually insert the tracking code into the bottom of the page, this was just a mid-diagnosis quick-fix. Once the mod is working correctly it will insert the tracking code itself.

The end result is that you need to modify the 'piwik.xml' file that comes as part of my Piwik Opencart eCommerce VQmod. The modification is very simple and just requires you to replace the following on line 19;

<search position="before" offset="1"><![CDATA[</body>]]></search>

with;

<search position="before" offset="1"><![CDATA[</body>]]></search>

This makes sure the javascript code which is dynamically generated by my mod is correctly inserted into the Mijoshop footer. As Mijoshop has a slightly different footer template file this VQmod search term needs this minor modification.

Thats all there is to it!

 

 

Share