Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modification requires a unique ID code! Opencart OCMOD

In Opencart 2.0.1.1, I tried to upload an OCmod configuration file with right name format .ocmod.xml but I get the error Modification requires a unique ID code!

like image 526
Muhammad Avatar asked Dec 05 '22 04:12

Muhammad


1 Answers

Official guide for modifications of Opencart 2 is missing to mention about the <code> tag that should be included in all ocmod configuration files

The system match this <code> tag with previously uploaded modification files to check if it has already been uploaded or not so every time you upload a modification file you should put the id in <code> tag and it should be unique

So for solution you just need to add your unique modification ID between <code>HERE</code> and put that after the <modification> tag

like this

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <code>Modification ID</code>
    <name>Modification</name>
    <version>1.0</version>
    <author>Author Name</author>
    <link>http://www.author.com</link>
    <file path="catalog/controller/common/home.php">
        <operation>
            <search><![CDATA[
            Search this
            ]]></search>
            <add position="replace"><![CDATA[
            replace with this
            ]]></add>
        </operation>
    </file>  
</modification>
like image 136
Muhammad Avatar answered Jan 02 '23 00:01

Muhammad