0

I am creating a module for opencart and in ocmod I want to add multi-line search and replace. How can I perfrom multi-line search and replace in ocmod.xml?

<file path="catalog/view/theme/fastor/template/common/footer.tpl">
        <operation>
            <search ><![CDATA[
                <?php
            $store_id = $config->get('config_store_id');
            if ($store_id    == '1') {
        ?>
            <div id="craftysyntax_1" style="float: right;"><script type="text/javascript" src="https://livehelp.clipboards.com/livehelp_js.php?eo=0&amp;department=1&amp;serversession=1&amp;pingtimes=10&amp;dynamic=Y&amp;creditline=W"></script></div>
        <?php } elseif($store_id    == '0') { ?>
            <div id="craftysyntax_2" style="float: right;"><script type="text/javascript" src="https://livehelp.clipboards.com/livehelp_js.php?eo=0&amp;department=2&amp;serversession=1&amp;pingtimes=10&amp;dynamic=Y&amp;creditline=W"></script></div>
        <?php } ?>
            ]]></search>
            <add position="replace"><![CDATA[
            <?php
                if( $moduleData['Enabled']=='yes'){
                    $var = htmlspecialchars_decode($moduleData['WidgetTitle'][$language_id]);
                    echo $var;
                }
            ?>
            ]]></add>
        </operation>
    </file>
4

1 回答 1

1

normaly you can not, but there is fix which allow that funcionality

http://www.opencartjazz.com/en/oc2011-bugfix-extension-installer

于 2017-01-17T22:37:26.627 回答