![]() |
Chapter 2
Introduction
A Miva Merchant module is a set of functions. Each function provides Miva Merchant with the data required to perform a specific task. There are 13 module types and each type requires specific functions to be in the module.
Module Functions
Functions that are used within Miva Merchant have the following syntax.
<MvFUNCTION NAME="modulefunc"
PARAMETERS="var1,var2,..."
STANDARDOUTPUTLEVEL="html,text"
ERROROUTPUTLEVEL="syntax,expression,runtime">
...code...<MvFUNCRETURN VALUE="{expression}">
...code...
</MvFUNCTION>For further information on function structure and use, refer to the Miva Script Reference Manual.
Function Return Value
There are two types of return values generated by the module functions.
Requirement for Functions in the Module
There are certain functions that must be present in every module. This manual defines the functions that must be present in each type of module. Required functions that are unused return a Boolean yes (1). The structure shown below is all that is required:
<MvFUNCTION NAME = "(function name)" STANDARDOUTPUTLEVEL = "" ERROROUTPUTLEVEL = "syntax, expression">
<MvASSIGN NAME = "l.ok" VALUE = 1>
Error Messages
The developer is responsible for creating and returning error messages for errors that occur during the processing of the function.
Errors returned by Miva Empresa or the operating system are displayed on the terminal screen.
Examples
Miva Merchant comes with a group of modules. These modules are stored in subdirectory below the modules directory which is in the Merchant2 directory. Refer to these modules for examples of how the functions are used within a module. Review more than one module of each type, because functions can be used in different ways and you may not get the full functionality by just looking at one example.
| Join Our Mailing List | Privacy Policy | Store Policies | Contact Us |
| © Copyright 2008 Miva Merchant. All Rights Reserved. |