If I had the same file twice I get the message "Modification requires a unique ID code" when installing the extension (Please note that if I remove one of the file section it uploads fine so the issue is not actually with the code ID) Here is what I have:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Spare Parts</name>
<version>1.0</version>
<author>Olivier</author>
<code>spare_parts</code>
<link></link>
<file path="admin/model/catalog/product.php">
<operation error="log">
<search index="0"><![CDATA[$this->db->query("DELETE FROM " . DB_PREFIX . "product_option WHERE product_id = '" . (int)$product_id . "'");]]></search>
<add position="before"><![CDATA[
//spare parts extension
if ( $product_id !=671 )
{//only update the options if this product is not the spare parts
]]>
</add>
</operation>
</file>
<file path="admin/model/catalog/product.php">
<operation error="log">
<search index="1"><![CDATA[$this->db->query("DELETE FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "'");]></search>
<add position="before"><![CDATA[
}//end except spare parts
]]>
</add>
</operation>
</file>
</modification>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Spare Parts</name>
<version>1.0</version>
<author>Olivier</author>
<code>spare_parts</code>
<link></link>
<file path="admin/model/catalog/product.php">
<operation error="log">
<search index="0"><![CDATA[$this->db->query("DELETE FROM " . DB_PREFIX . "product_option WHERE product_id = '" . (int)$product_id . "'");]]></search>
<add position="before"><![CDATA[
//spare parts extension
if ( $product_id !=671 )
{//only update the options if this product is not the spare parts
]]>
</add>
</operation>
<operation error="log">
<search index="1"><![CDATA[$this->db->query("DELETE FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "'");]></search>
<add position="before"><![CDATA[
}//end except spare parts
]]>
</add>
</operation>
</file>
</modification>