OpenCart error : Modification requires a unique ID code!

While installing the OpenCart module if you found OpenCart error: Modification requires a unique ID code! then it means that either you are missing <code>ModuleUniqueName</code> or there is a conflict with another module unique name.

If you are missing <code> code

If you are missing <code> means, while writing ocmod.xml file you missed to write <code>ModuleUniqueName</code> which we missed most.

Open your “*.ocmod.xml” file of your module you are installing then add following lines inside modification schema:

<code>Module Unique Name</code>

Like in our list all opencart module all.install.ocmod.xml contains <code>List_all_Products</code>:

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>List Out All Products OpenCart 2.3 OCmod</name>
    <version>1.0</version>
    <author>Rupak Nepali, Webocreation.com</author>
    <code>List_all_Products</code>
    <link>https://webocreation.com</link>
    <file path="catalog/view/theme/*/template/common/header.tpl">
        <operation>
            <search><![CDATA[
            <ul class="nav navbar-nav">
            ]]></search>
            <add position="After"><![CDATA[
            <li><a href="index.php?route=product/allproduct">All Products</a></li>
            ]]></add>
        </operation>
    </file>
</modification>

If there conflict with another module unique name

Then rename the name within <code>ModuleUniqueName</code> and install it again you will see following:

openart successfull installation of ocmod module

Similar issues can be The directory containing files to be uploaded could not be found: OpenCart error

Happy successful module installation, you can let me know if you found any issues then we can solve. If you like to read more about the Ocmod then read OCMOD Modification System opencart 2.3

Previous articleOpenCart Module Development Video Tutorial Introduction and Table of Contents
Next articleConfigure and show how default featured module works Opencart 3

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here