View example.xml
<mvt:assign name="l.comma" value="asciichar('44')" />
<mvt:assign name="l.linebreak" value="asciichar('10')" />
<mvt:foreach iterator="order" array="admin_order:orders">
<mvt:foreach iterator="group" array="order:groups">
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
<mvt:if expr="miva_array_search( l.settings:products, 0, l.item, 'l.item:code EQ l.settings:group:code' )">
<mvt:assign name="l.item:quantity" value="l.item:quantity + l.settings:group:quantity" />
<mvt:assign name="l.item:subtotal" value="l.item:subtotal + l.settings:group:subtotal" />
View coupon_batch_report.html
<mvt:foreach iterator="order" array="admin_order:orders">
<mvt:foreach iterator="coupon" array="order:coupons">
:total (discount applied to order)
View example.xml
<mvt:foreach iterator="group" array="basket:groups">
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
<mvt:if expr="miva_array_search( l.settings:new_array, 0, l.item, 'l.item:code EQ l.settings:group:code' )">
<mvt:assign name="l.item:quantity" value="l.item:quantity + l.settings:group:quantity" />
<mvt:assign name="l.success" value="miva_array_insert( l.settings:new_array, l.settings:group, -1 )" />
<mvt:comment> <!-- Build Dynamic Array --> </mvt:comment>
View variant_price_range.html
Load all possible variants using toolkit
<mvt:item name="toolkit" param="variantarray|vcount|g.product_code" />
Loop though variants, load product information for each variant, insert into new array
<MvFUNCTION NAME = "Module_Description" PARAMETERS = "module var" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME = "l.module:code" VALUE = "call_url_stsk">
<MvASSIGN NAME = "l.module:name" VALUE = "HTTP Request to URL">
<MvASSIGN NAME = "l.module:provider" VALUE = "Miva Merchant">
<MvASSIGN NAME = "l.module:version" VALUE = "9.0003">
<MvASSIGN NAME = "l.module:api_ver" VALUE = "9.05">
<MvASSIGN NAME = "l.module:description" VALUE = "This Scheduled Task allows you to setup a URL which will get called via an http request when the task is run.">
<MvASSIGN NAME = "l.module:features" VALUE = "util, vis_util, scheduledtask">
View mvt_call_headers.html
<mvt:assign name="g.api_endpoint" value="''" />
<mvt:assign name="g.index_name" value="'docs.miva'" />
<mvt:assign name="g.path" value="'/1/indexes/' $ g.index_name $ '/390342730'" />
<mvt:assign name="g.api_request" value="g.api_endpoint $ g.path" />
<mvt:assign name="g.headers" value="'X-Algolia-API-Key: 17181817181912' $ asciichar( 13 ) $ asciichar( 10 )" />
<mvt:assign name="g.headers" value=" g.headers $ 'X-Algolia-Application-Id: HSGDJDJDGD' $ asciichar( 13 ) $ asciichar( 10 )" />
<mvt:call action="g.api_request" method="'PUT'" headers="'g.headers'">
View header-example.php
if ( false === ( $mivaHeader = get_transient( 'miva_header' ) ) ) {
$mivaHeader = file_get_contents("http://" . $hostname . "/mm5/merchant.mvc?Screen=WP-HEADER");
set_transient( 'miva_header', $mivaHeader, 24 * HOUR_IN_SECONDS );
echo $mivaHeader;
where sep determines whether or not the separator should be appended (that would be '?' if no other parameters exist, or '&' if there are, meaning you can simple just start tacking on parameters without having to add anything before it), force_secure… forces secure, and nosession keeps all session variables out of the url (Session_ID, [Customer|Affiliate|Checkout]_Session_ID). There are also other flags available when building a URI, but those are not available from the Store_XXX_URL functions. As another note, we do also have Store_Category_Code_URL and Store_Product_Code_URL available for those times when no category var or product var is present.
View gist:26d12958c5c013dd99165a6bc182a79a
//create a new page in Miva called REQUEST_IMAGE with the following code:
<mvt:assign name="l.constraints[1]:height" value="encodeentities(g.image_height)" />
<mvt:assign name="l.constraints[1]:width" value="encodeentities(g.image_width)" />
<mvt:assign name="l.imagetype_codes[1]" value="encodeentities(g.image_type)" />
<mvt:do name="l.success" file="g.Module_Library_DB" value="Product_Load_Code( encodeentities(g.Product_Code), l.settings:product )" />
View 1. Documentation &


A Transient is a simple way of storing cached data in the database temporarily, by giving it a custom name and a timeframe after which it will expire and be deleted.

Transients are useful when pinging another API (i.e. Wordpress, Instagram, twitter), and saving data for a set period of time.

Once the module is installed, you will find a tab under Utilities. This batch list is only used for debugging. You can view transients here, and delete them.

Please Note