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

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

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru 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>  

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

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.bigmax.ch - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru 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.

Active Member

Posts

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

Users browsing this forum: No registered users and 3 guests