Post by Frens » Wed Jul 26, 2017 5:41 pm

Hi.
I made a test.ocmod.xml file

Code: Select all

<modification>
    <name>Tabs</name>
    <code>Tabs-site</code>
    <version>1.0</version>
    <author>test</author>
    <link>http://test.com</link>
    <file path="catalog/view/theme/*/template/information/information.tpl">
        <operation>
            <search><![CDATA[
            $data[<div class="container">
            ]]></search>
            <add position="replace"><![CDATA[
            $data[xxxx
            ]]></add>
        </operation>
    </file>  
</modification>
Whit the extension installer upoads fine and refresh cash in modefications, so everthing looks good., but in the front store nothing happens.

OC v2.3.0.2

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by IP_CAM » Wed Jul 26, 2017 11:15 pm

<search><![CDATA[$data[<div class="container">]]></search>
<add position="replace"><![CDATA[$data[xxxx]]></add>
---
well, better check again, how OcMod should be written, to make it work! ::)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Frens » Wed Jul 26, 2017 11:35 pm

Thanks,

I have look 100 times to a working sample , but can find :choke:
https://github.com/opencart/opencart/wi ... ion-System

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Modification Default</name>
    <version>1.0</version>
    <author>OpenCart Ltd</author>
    <link>http://www.opencart.com</link>
    <file path="catalog/controller/common/home.php">
        <operation>
            <search><![CDATA[
            $data['column_left'] = $this->load->controller('common/column_left');
            ]]></search>
            <add position="replace"><![CDATA[
            test123
            ]]></add>
        </operation>
    </file>  

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by IP_CAM » Wed Jul 26, 2017 11:55 pm

well, you screwed up by the opening/closing brackets [ .... ]
and such crab could never function anyway: $data[<div class="container">
---
<operation>
<search><![CDATA[
$data['column_left'] = $this->load->controller('common/column_left');
]]></search>
<add position="replace"><![CDATA[
test123
]]></add>
</operation>
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Frens » Thu Jul 27, 2017 12:10 am

Thanks for help ! works fine now.

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm
Who is online

Users browsing this forum: Google [Bot] and 28 guests