View miva-PATR-mvt-call-PROD.xml
<mvt:assign name="g.Product_URL" value="l.settings:product:link $ '?Session_ID=' $ g.Session_ID $ '&Error_MissingAttributes=1&Quantity=' $ g.Quantity" />
<mvt:assign name="l.counter" value="1" />
<mvt:while expr="l.counter LE miva_array_elements(g.Product_Attributes[l.counter])">
<mvt:assign name="g.Product_URL" value="g.Product_URL $ '&Product_Attributes[' $ l.counter $ ']:value=' $ g.Product_Attributes[ l.counter ]:value" />
<mvt:assign name="l.counter" value="l.counter + 1" />
</mvt:while>
<mvt:call action="g.Product_URL" method="'GET'">
<mvt:eval expr="s.callvalue" />
</mvt:call>
<mvt:exit/>
View miva-sql-select-related-products-for-provisoning.sql
View miva-assign-default-items-to-all-front-end-pages.xml
<mvt:do file="g.Module_Feature_TUI_DB" name="l.success" value="PageList_Load_All( l.settings:pages )" />
<mvt:foreach iterator="page" array="pages">
<Page_Update code="&mvte:page:code;">
<Secure>Yes</Secure>
</Page_Update>
<mvt:if expr="'EMAIL_' CIN l.settings:page:code EQ 1 OR 'ORDER_' CIN l.settings:page:code EQ 1 OR 'SHIPMENT_' CIN l.settings:page:code EQ 1 OR 'TEMPLATEFEED_' CIN l.settings:page:code EQ 1">
View miva-get-difference-of-two-arrays.xml
<mvt:assign name="l.settings:lists:small" value="miva_array_deserialize('Apples,Bananas,Carrots')" />
<mvt:assign name="l.settings:lists:big" value="miva_array_deserialize('Apples,Bananas,Carrots,Lemons,Limes,Oranges')" />
<mvt:assign name="l.result" value="miva_array_filter( l.settings:lists:big, 0, l.big_item, 'NOT miva_array_find( l.big_item, l.settings:lists:small, 0 )', l.settings:lists:difference )" />
<mvt:eval expr="glosub(miva_array_serialize(l.settings:lists), ',', '<br>')" />
View miva-output-xml-provisioning-to-make-all-pages-secure.xml
<mvt:do file="g.Module_Feature_TUI_DB" name="l.success" value="PageList_Load_All( l.settings:pages )" />
<mvt:foreach iterator="page" array="pages">
<Page_Update code="&mvte:page:code;">
<Secure>Yes</Secure>
</Page_Update>
</mvt:foreach>
View miva-marketing-feed-variant-price-range-generator.xml
<mvt:comment>
------------------------------------------------
Variant Price-Range Generator
Code: TEMPLATEFEED_VPRG
Iterator Template
Instructions:
1. Create a new Marketing > Feed and configure it as follows:
- Code: VPRG
- Name: Variant Price-Range Generator
View miva-load-all-custom-fields-from-group.xml
<mvt:do file="g.Module_Root $ '/modules/util/customfld.mvc'" name="l.success" value="Group_Load_Code('specs', l.specs_group)" />
<mvt:do file="g.Module_Root $ '/modules/util/customfld.mvc'" name="l.success" value="ProductFieldAndValueList_Load_Group(l.settings:product:id, l.specs_group:id, l.settings:specs_field_values)" />
View quick-order-form.js
// ---- Quick OrderForm --- //
(function quick_order_form(){
var $button = $('#js-quick-add-button, .js-quick-add-button'),
form_selector = '.js-quick-add-form',
$container = $('.js-quick-add'),
doing_adpr = 0;
var init = function(){
$(document).on('submit', form_selector, function(e){
e.preventDefault();
View miva-tokenlist-in-smt.xml
token<mvt:assign name="l.settings:scopes" value="miva_array_deserialize( 'l,g,s' )" />
<table border="1">
<mvt:foreach iterator="scope" array="scopes">
<tr>
<td colspan="2"><h1>&mvt:scope;</h1></td>
</tr>
<tr>
<td>Variable Name</td>
<td>Value</td>
</tr>
View miva--get-part-of-string-after-occurrence-of-another-string.xml
<mvt:assign name="g.string" value="'something.com/goes-here.html'" />
<mvt:assign name="g.split" value="'.com'" />
<mvt:assign name="g.after_index" value="(g.split CIN g.string) + len(g.split)" />
<mvt:assign name="g.after" value="substring( g.string, g.after_index , len(g.string) )" />
&mvte:global:after;