Does anybody know how I can add my own code in files "index.php", "admin/index.php" by using OCMOD?
My OCMOD's code is next:
It should work, but in reality it doesn't.
Code: Select all
<?xml version="1.0" encoding="utf-8"?> <modification> <name>Shipping method Delivery</name> <code>Shipping method Delivery</code> <version>1.0.0</version> <author>kagan</author> <link>11</link> <file path="admin/index.php|index.php"> <operation> <search><![CDATA[ $registry->set('cache', $cache); ]]></search> <add position="after"><![CDATA[ // Method of shipping - Deliery library require_once(DIR_SYSTEM . 'library/shippingDelivery.php'); $delivery_library = new ShippingDelivery($registry); $registry->set('shipping_delivery', $delivery_library); ]]></add> </operation> </file> </modification>
In addition the file "admin.php" has edited successfully, but it seems to me that nothing has changed, and the OpenCart is continuing to use a base file which is located in "admin/index.php" (ignoring the modificated file).
I will be glad to any advice!)