Post by ilmix2017 » Thu Jun 22, 2017 1:24 am

I'm going through opencart tutorial ("Opencart tips and tricks") and when I try to upload my modification using Extensions installer I get the following error: "Modification requires a unique ID code!". The modification has the <code> tag. I'm using opencart 2.3.0.2 on xampp . What could be causing this?

Newbie

Posts

Joined
Thu Jun 22, 2017 1:05 am

Post by Johnathan » Thu Jun 22, 2017 2:00 am

The ocMod file needs a <code> declaration at the top of the file (within the <modification> tag). The ocMod example on Github doesn't have this, which is dumb because it's a requirement. For example:

<code>my_code_name</code>

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by soundzgood-nz » Thu Aug 24, 2017 7:42 pm

You will also get this error message if you don't close any of the other tags, eg

Code: Select all

<file path="catalog/view/theme/*/template/account/order_info.tpl">
    <operation>
      <search>
        <![CDATA[<a href="<?php echo $product['return']; ?>" data-toggle="tooltip" title="<?php echo $button_return; ?>" class="btn btn-danger"><i class="fa fa-reply"></i></a></td>]]>
      </search>
      <add position="replace">
        <![CDATA[</td>]]>
      </add>
    </operation>
  <file path="catalog/view/theme/*/template/extension/module/account.tpl">
    <operation>
    
Missing </file> tag before new <file> declaration.
Simon

User avatar
Active Member

Posts

Joined
Sat Oct 25, 2014 5:15 pm
Location - New Zealand

Post by GilesM » Sun Nov 19, 2017 8:38 pm

I would also point out that I got this message as well due to having an illegal character in the <link></link> section of the header.

Removed the link and everything worked fine!

PGM

Don't pay for simple mods
My free modules: Filter resets in admin, Add extra flat shipping, Improved Admin Product Search and Canned Messages.
My site uses (free): Modification refresh button, Additional Alert Email Fix, TLT Structured Data
My site uses (paid): Journal2, Restrict catalog by customer group


New member

Posts

Joined
Mon May 29, 2017 8:28 pm

Post by supak111 » Tue Dec 27, 2022 2:16 pm

GilesM wrote:
Sun Nov 19, 2017 8:38 pm
I would also point out that I got this message as well due to having an illegal character in the <link></link> section of the header.

Removed the link and everything worked fine!
Wow this just helped me out a lot, THANKS

I just had some html in there and got this error. Would have never figured it out lol

~ OC 3.0.3.2 and OCmods only ~


User avatar
Active Member
Online

Posts

Joined
Fri Feb 13, 2015 12:09 pm
Who is online

Users browsing this forum: sooty and 177 guests