Skip to content

Miva API Function Reference#


The Miva Merchant software has a number of native API functions which can be implemented via Miva Template code. All functions are available within the LSK

Miva Merchant API functions can be implemented using the <mvt:do> tag passing in the module location as the file parameter and the function including any function parameters with the value parameter of the <mvt:do> tag.

Example#

Using the Product_Load_Code function will load the product information within the product var variable defined for the product code defined in the code parameter.

<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code(code, product var)" />

Note

It is important to remember to pull in the module before running functions that are module dependent.

<mvt:do file="g.Module_Library_DB" name="l.loaded_module" value="Module_Load_Code_Cached( 'customfields', l.customfields_module )" />

<mvt:if expr="NOT l.loaded_module">
  <mvt:exit />
</mvt:if>

<!-- Products -->
<mvt:do file="l.customfields_module:module" name="l.success" value="ProductFieldValue_Load_CodeAndProduct( code, product_id, field var, value var )" />

<!-- Categories -->
<mvt:do file="l.customfields_module:module" name="l.success" value="CategoryFieldValue_Load_CodeAndCategory( code, cat_id, field var, value var )" />

<!-- Orders -->
<mvt:do file="l.customfields_module:module" name="l.success" value="OrderFieldValue_Load_CodeAndOrder( code, order_id, field var, value var )" />

<!-- Customers -->
<mvt:do file="l.customfields_module:module" name="l.success" value="CustomerFieldValue_Load_CodeAndCustomer( code, cust_id, field var, value var )" />