OCMOD searching whem i have line breaks or undefined whitespaces

462 Views Asked by At

im trying to make a OCmod for opencart 2.0.3.1 and when i try to find in catalog/view/theme/*/template/common/header.tpl

these two parts of html code the script dont find anything in error log its says NOT FOUND.

the first search is that

<search>
 <![CDATA[
  <?php } ?>
  <?php } ?>
 ]]>
</search>

and the seccond serach if for that

      </ul>
    </div>
  </nav>

both of this searchs not find any thing but i copied and pasted from the original file. some one can help me to improve this serach whit regex or tell me how ocmod works to serach that?

1

There are 1 best solutions below

1
On

Here is the sample OCMod code to do more better search in your opencart 2.x version.

<file path="catalog/view/theme/*/template/common/header.tpl">
        <operation>
            <search><![CDATA[}}]]></search>
            <add position="after"><![CDATA[This is test ocmod]]></add>
        </operation>
    </file>

This is test ocmod text display after } } Try this kind of code in your ocmod.