When I need to apply modifications to one file, I use the code below:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Modification name</name>
<file path="system/library/cart/cart.php">
<operation>
<search><![CDATA[<some code to apply>]]></search>
<add position="after"><![CDATA[// <some code to apply>]]></add>
</operation>
</file>
<modification>
Target file is set via path attribute of file tag.
How to apply modifications to all .php files? I've tried with no luck the code below:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Modification name</name>
<file path="**/*.php">
<operation>
<search><![CDATA[<some code to apply>]]></search>
<add position="after"><![CDATA[// <some code to apply>]]></add>
</operation>
</file>
<modification>
According to https://github.com/opencart/opencart/wiki/Modification-System
Maybe give this a try
where
/*/*/is the path to where all the php files that you wish to include