MIVA Merchant 5 Module API Feature externalreq
What MIVA Says
The purpose of this feature is to provide an opportunity to make sure that the running environment for the store meets special requirements of the module, such as ssl being available.
Required function: Module_External_Requirements_Met [back]
Parameters:
Return Type:bool
<MvFUNCTION NAME="Module_External_Requirements_Met" PARAMETERS="module var" STANDARDOUTPUTLEVEL="">
<MvFUNCTIONRETURN VALUE="1">
</MvFUNCTION>
What MIVA Says
Admin calls this function when displaying one of the feature configuration screens, such as: System Extension Configuration, Shipping Config, Payment Config, Order Fulfil Config, Logging Config, System Extension Config, Utilities Config.
The function must return true or else Admin will not include module in list of those assignable to store. One could code the module to test for the state of some arbitrary requirement, e.g. that the server runs ssl, and return false if the server fails the test. This would prevent store administrators from installing the module to the store until and unless the ssl requirement is met.
Default Return: 1
Return Types [back]
Return Types are expressed in the document by the following codes:
- string:
A string return type is any string you wish though normally it is a string that has a specific intent such as the formatted version of a decimal number as you might use in a currency module.
- cslist:
This is a comma separated list values. Most commonly used to return a list of codes for fields.
- cclist:
This is a comma separated list of colon separated values. Most commonly used as a return from tab functions so that you might have a value like "NVALS:Normal Values,SPECVALS:Special Values,OVALS:Other Values" and the system would be treating each comma separated pair as a tab and using the value on the right of the colon as the label for the tab and the value on the left of the colon as the code for the tab.
- bool:
A boolean "true/false" return value, normally a "1" represents a true value and a "0" represents false. Because of the way the MIVA script language treats strings and numbers any string other than a space, and any number other than a 0 will be treated as a true return value whereas a false value can be expressed by a null value like "" or an expression that evaluates to null or zero like "{ 1 - 1 }" or the absence of the "VALUE" attribute entirely.
- boolinv:
An inverted boolean "true/false" return value. This is when the value returned is a boolean value just like the type "bool" but that the normal default return is a false rather than a true value and that you only return true if some special case is true. In the MIVA Merchant API Most functions that are boolean expect a return of true unless something has gone wrong or some special condition occurs, but in this case it is "normal" to return a false value and you only return a true value if something unusual happens. A specific example would be the TaxModule_Order_Invalid function which only returns a true value if one of the fields is invalid.
- tristate:
Acts like a boolean except that a negative value, usually -1 by convention, indicates an unusual but non error state. In most cases this will be used to cause the normal operations to not be completed without causing an error to be output in order to interrupt something that the system was about to do. This is used for example in system extension interrupts to stop a normal action like adding a product to the basket from taking place so the module can take on the role of adding the item to the basket itself, or preventing it from happening without causing the system to throw the normal errors.
- acount:
This is a numeric value that represents a count of the size of an array passed back by reference. A null or 0 return value acts the same as for a bool return type, meaning nothing happens, but a value of 1 indicates only one array index point exists whereas a return of 3 indicates 3 array index points returned. This is used for example in the shipping and payment method functions that have a method parameter passed in by reference and the return indicates the size of the method array being set in the l.method variable.
For information and function requirements for the various MIVA Merchant 5 Module API Feature Codes see the following:
batchreport,
component,
component_prov,
currency,
custrt,
data_domain,
data_store,
export,
externalreq,
fields_cust,
fields_prod,
fulfill,
import,
log,
not_fields,
payment,
provision_store,
shipping,
storeselui,
storewizard,
system,
tax,
upload,
util,
wizard,
vis_affil,
vis_affilbe,
vis_category,
vis_categorybe,
vis_cust,
vis_custbe,
vis_domain,
vis_fulfill,
vis_log,
vis_order,
vis_payment,
vis_product,
vis_productbe,
vis_shipping,
vis_store,
vis_system,
vis_util,
vis_wizard
This document is copyright 2005-2006 4TheBest eCommerce Solutions and was last generated using Serade on 01/13/2006 23:04:54. It is permissible to place a copy of this document in it's current or altered form on your website as long as you leave the copyright notice along with the links to the websites referenced intact.