Structure

 

 

 <?xml version="1.0"?>
 <addon>
               <id>addon_name</id> /* Text identifier of the addon, must be the same as the name of the catalog where the addon is located */
               <name>Addon name</name> /* Name of the addon */
               <description>This addon is aimed to provide ...</description> /* Short description of the addon */
               <priority>1</priority> /* Connection priority – the higher it is, the later hooks, templates and pre/postcontrollers of the addon are connected */
               <status>active</status> /* Status – it is set when installing the addon */
               <dependencies></dependencies> /* Dependencies – addon identifiers the addon depends on, separated by comma. Not used yet. */
               <translations> /* Section where the addon is translated into other languages. If the parameter for = "name" – translation of the name, for = "description" – translation of the description. Parameter lang – language code in capital letters */
                               <item for="name" lang="ES">Códico de barras de pedido</item>
                               <item for="description" lang="ES">Códico de barras de pedido addono babette</item>
                </translations>
                <opt_settings> /* Section where the addon settings are determined.*/
                               <item id="option_name"> /* Parameter id – option identifier, mandatory for all option types that have description, except for the info type */
                                               <name>Option name</name> /* Name of the option */
                                               <type>states list</type> /* Option type: input, textarea, password, checkbox, selectbox, multiple select, multiple checkboxes, countries list, states list, file, info, header */
                                               <default_value>C128B</default_value> /* Default value */
                                               <variants> /* Section of the option variants list. Used only for the types selectbox, multiple select, multiple checkboxes */
                                                          <item id="C128A"> /* id – variant identifier */
                                                                          <name>Code 128-A</name> /* variant name */
                                                                          <translations> /* Section of variant translation. Identical to the addon translation, but the parameter for is not used */
                                                                                     <item lang="ES">Code huyatto</item>
                                                                          </translations>
                                                         </item>
                                               </variants>
                                               <translations> /* Section of option translation. Identical to the addon translation, but the parameter for is not used */
                                                            <item lang="ES">Tipo</item>
                                               </translations>
                                    </item>
                                    /* Example of the header type option */
                                    <item id="elm_specification"> /* Parameter id is mandatory, but in case of header it is used only in tables with descriptions */
                                                   <name>Specification</name>
                                                   <type>header</type>
                                                   <translations>
                                                             <item lang="ES">Especificación</item>
                                                             <item lang="FR">Spécification</item>
                                                   </translations>
                                     </item>
                                     /* Example of the header type option */
                                     <item> /* This information field displays the result returned by the function which is specified in the node handler */
                                                    <name></name>
                                                    <type>info</type>
                                                    <handler>fn_get_barcode_specification</handler>
                                     </item>
                   </opt_settings>
                   <opt_queries> /* Section of additional queries to the database */
                                      <item>ALTER TABLE ?:products ADD COLUMN test</item> /* If the parameter for="install" or it is absent, a query is performed when installing the addon */
                                      <item for="uninstall">ALTER TABLE ?:products DROP COLUMN test</item> /* If the parameter for="uninstall", a query is performed when deleting the addon */
                   </opt_queries>
                   <opt_language_variables> /* Section of language variables addition */
                                      <item lang="EN" id="test123">Test</item> /* id – variable name, lang – language for which it will be added. The value for the base language is mandatory. */
                   </opt_language_variables>
 </addon>

Copyright © 2009 SP-CART.COM. All Rights Reserved.