Post by nikolakrivokapic » Thu Mar 09, 2017 8:12 pm

Hi, can you please clarify for me what this line is doing:
<file name="catalog/view/theme/*/template/*/{search}*.tpl">

Ok, I understand it is including all files in directory. But what is {search}, does that mean to Exclude search.tpl file from this modification or contrary to apply modification only on this file and not on others?

Anyhow, how can I exclude one file from modification where it is saying *.tpl ? I want to exclude one particular file from mod. How?
Thanks!


Posts

Joined
Thu Feb 02, 2017 9:26 pm

Post by Jsf » Tue Mar 14, 2017 4:47 pm

Hello,
I have a solution for you. Not the best, but working for me.

You can use ignoreif statement:

Code: Select all

<file path="catalog/controller/extension/module/*.php>
	<operation error="skip">
		<search><![CDATA[, $this->config->get('config_tax')]]></search>
		<ignoreif regex="true"><![CDATA[~(ControllerModuleJournal2CustomSections)~]]></ignoreif>
		<add position="replace"><![CDATA[, $this->config->get('config_tax'), true, $result['product_id']]]></add> 
	</operation>
</file>
Every file has a specific phrase so as in my example I do modification for all module file, but exclude CustomSections.php file, because only this file has "ControllerModuleJournal2CustomSections" text.

P.S. You do not need to use regex, but it is good if you want to exclude more than one files. You can use REGEX OR statement ( | )

I hope it will help to you.

/*
My personal OpenCart modules list
*/


User avatar
Jsf
New member

Posts

Joined
Sun Jan 26, 2014 4:08 am
Who is online

Users browsing this forum: No registered users and 8 guests