Mail: [email protected] Phone: +1(424)231-4091

Module's config.xml File

The config.xml is the file that defines a module. It's used by NexoPOS to identify a module and to distinguish it from other modules. This will explain all you need to know about the config.xml file.

Structure Of The config.xml File

That file is located at the root of every module. A module not having that file is not a valid module and might even not appear as a module on the dashboard. That file must have a specific structure like so :

<?xml version="1.0" ?>
<module>
    <namespace>NsStockTransfers</namespace>
    <version>4.5.1</version>
    <author>Blair Jersyer</author>
    <name>Stock Transfers Module</name>
    <description>module description</description>
</module>

The "module" tag is a required parameter. As a child, it has the following tags

  • namespace (required): a unique identifier of the module. Should not have any space or special character.
  • version (required): the actual version of the module.
  • author (required): The name of the author.
  • name (required): A human name for the module. This will be displayed on the module list.
  • description (required): a brief description of the module. This will also be displayed on the modules list.

Defining Dependency

If you would like to require certain modules in order to allow a module to be activated, you should define a "requires" tag that accepts as sub-tags all the modules you would like to require.

<requires>
        <dependency namespace="NsMultiStore" min-version="4.7.0">Nexo Multi Store Module</dependency>
</requires>

In the previous example, we set as a dependency "NsMultiStore" which should be at least at version "4.7.0".

We can additionally define a "max-version" to set the maximum version allowed.

Force Core Version

If you would like the module to be compatible with a specific version of NexoPOS, you can define the core version using the "core" tag like so.

<core min-version="4.7.7" max-version="4.7.9"/>

In the previous example, we're requesting version "4.7.7" of NexoPOS and set the maximum version to be "4.7.9".