I'm testing the OCMOD for opencart 4.1.0.3. I'm trying with a simple test, i.e., to display a text in footer.
Here is my OCMOD code:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Test OCMOD for store footer</name>
<code>store_footer_updates</code>
<version>1.0.0</version>
<author>HuntBee OpenCart Extensions</author>
<link>https://www.huntbee.com</link>
<file path="catalog/controller/common/footer.php">
<operation>
<search><![CDATA[$data['scripts'] = $this->document->getScripts('footer');]]></search>
<add position="before"><![CDATA[
$data['test'] = 'TEST FOOTER TEXT';
]]></add>
</operation>
<operation error="skip">
<search error="skip"><![CDATA[Opencart\Catalog\Controller\Common;]]></search>
<add position="replace"><![CDATA[Opencart\Catalog\Controller\Extension\Ocmod\Common;]]></add>
</operation>
</file>
<file path="catalog/view/template/common/footer.twig">
<operation>
<search><![CDATA[</body>]]></search>
<add position="before"><![CDATA[
<!-- huntbee test-->
{{ test }}
]]></add>
</operation>
</file>
</modification>
What could be the issue, am i missing something here?