Informational Tags
The tags holding mod information are <name>, <author>, <version>, and <link>. All tags are optional.
<name> - The name of the OCMod (<id> in vQmod).
<author> - OCMod developer.
<code> - A unique string OpenCart will use to identify the script internally. Required starting in 2.0.1.0.
<version> - OCMod version.
<link> - URL in the form of http://example.com. If http:// is omitted the link will be broken.
Key OCMod Differences
Position attributes (replace, before, after) have been moved from <search> to <add>.
Code: Select all
<add position="replace"><![CDATA[//]]></add>
Code: Select all
<file path="catalog/controller/product/product.php">
Code: Select all
<file path="system/{engine,library}/{action,loader,config,language}*.php">
Code: Select all
<file path="system/engine/action.php,system/engine/loader.php,system/library/config.php,system/library/language.php">
Regex will always perform a replace operation. Operations "before" and "after" are not available.
Indexing begins at 0 instead of 1.
Development Mode
Uploading ocMod scripts may be bypassed by placing them in the system directory (/system). The modification system will directly load and apply them when the cache is manually refreshed through Extensions -> Modifications in Admin.
Zip ocMod Distributable
ocMods may be distributed as zip files that are directly installable from OpenCart's Extension Installer.
- The zip file name must end in .ocmod.zip.
- The ocMod script must be located in the root of the zip file.
- The ocMod script must be named install.xml.
- The zip file must contain an /upload directory in the root, even if it's empty.
- The zip file may contain additional files unrelated to the mod such as documentation.
Unavailable Features As Of OpenCart 2.0
- <file> error attributes (skip, log, abort).
- <operation> error attributes (skip, log, abort).
- Operation <ignoreif>.
- Position (search/add) attributes top, bottom, ibefore, and iafter.
OpenCart 2.0
- Regex searches are not trimmed so leading/trailing whitespace in the CDATA tag can lead to failure. [FIXED OpenCart 2.0.3.0]
- Multiple matches to a <search> will result in unintended side effects as OCMods string position index will be invalidated! [FIXED]
- Despite information on the OpenCart wiki, the "index" attribute is not available. [FIXED]
- The "offset" attribute is buggy and does not work as expected. [STATUS UNKNOWN]