View miva-ocst-login-ajax.html
<div id="js-ocst-login" class="row mfp-hide forgot-password">
<form method="post" action="&mvte:urls:_self:auto;" autocomplete="off" class="column whole js-ocst-login-form">
<input type="hidden" name="Action" value="LOGN" />
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
<h4 class="fields-heading">Account Login:</h4>
<div class="form-row">
<div class="floating-placeholder">
<input type="text" name="Customer_Login" value="&mvte:global:Customer_Login;" id="l-Customer_Login" autocomplete="off" class="input">
<label for="l-Customer_Login">Email Address</label>
</div>
View miva-9-7-productvariantlist_load_product.md

ProductVariantList_Load_Product

<mvt:do file="g.Module_Library_DB" name="l.settings:product:variant_count" value="ProductVariantList_Load_Product(l.settings:product:id, l.settings:product:variants)" />

Sample Data Structure

:active=1
View alternative-approach.js
ImageMachine.prototype.oninitialize = function (data) {
gallery.length = 0;
mainImageZoom.attr('data-index', 0);
thumbnailIndex = 0;
this.Initialize(data);
if (data) {
updateThumbs();
$('#js-thumbnails .thumbnail-wrap:not(.slick-cloned)').first().click();
}
}
View miva-field-validation.js
/*
/mm5/5.00/lib/util_public.mv
<MvFUNCTION NAME = "Phone_Validate" PARAMETERS = "phone, country" STANDARDOUTPUTLEVEL = "">
*/
function validate_phone(phone, country){
if( country === 'US' || country === 'DE' ){
phone = String(phone).replace(/[\+\/\(\)\-\x\.\s]/g, '');
if ( !/^\d+$/.test(phone) ) {
return false;
View miva-osel-create-account-iframe.xml
<mvt:if expr="g.CustomerCreate">
<iframe name="processCreate" id="js-process-create" class="all-hidden"></iframe>
<form action="&mvt:global:secure_sessionurl;" method="post" target="processCreate" id="js-create-account" class="all-hidden">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
<input type="hidden" name="Action" value="ICST" />
<input type="hidden" name="Screen" value="ACED" />
<input type="hidden" name="PrevPage" value="INVC" />
<input type="hidden" name="Customer_LoginEmail" value="&mvte:global:Basket:ship_email;" />
<input type="password" name="Customer_Password" value="&mvte:global:CustomerCreate;" />
<input type="password" name="Customer_VerifyPassword" value="&mvte:global:CustomerCreate;" />
View miva-uri-management-templates.md

Page URIs

/<mvt:if expr="l.settings:page:code NE 'SFNT'"><mvt:if expr="NOT ISNULL l.settings:page:slugified_title"><mvt:eval expr="tolower( l.settings:page:slugified_title )" /><mvt:else><mvt:eval expr="tolower( l.settings:page:slugified_name )" /></mvt:if>.html</mvt:if>

Category URIs

/<mvt:if expr="NOT ISNULL l.settings:category:slugified_page_title"><mvt:eval expr="tolower( l.settings:category:slugified_page_title )" /><mvt:else><mvt:eval expr="tolower( l.settings:category:slugified_name )" /></mvt:if>.html
View sync-css-and-js-breakpoint-values--ress.js
RESS = {};
RESS.resize = function() {
var a;
return function() {
clearTimeout(a);
a = setTimeout(function() {
a = null;
RESS.storeSizes();
}, 250);
};
View miva-mysql-set-next-order-id.sql
UPDATE `s01_StoreKeys`
SET `maxvalue` = 3000
WHERE `type` = 'Orders'
View miva-mysql-regex-validation.xml
<!--
https://www.miva.com/forums/forum/designers-and-developers/mivascript-miva-merchant-empresa/8538-regular-expressions#post171523
-->
<mvt:assign name="g.Pattern" value="'^Foo(bar)?'" />
<mvt:assign name="l.settings:query:query" value="'SELECT \'foo\' REGEXP ?'" />
<mvt:assign name="l.settings:query:bind_parameters[1]" value="g.Pattern" />
<mvt:item name="sql" param="l.settings:query" />
Foo=&mvt:query:results;
View miva-recent-wordpress-posts.xml
<mvt:comment>
| ---------------------------------------------
| Display 3 Recent Posts from WordPress
| ---------------------------------------------
</mvt:comment>
<mvt:comment>
| Check for existing data Transient
</mvt:comment>
<mvt:do file="g.Module_Root $ '/modules/util/transients.mvc'" name="l.settings:recent_posts:serialized_data" value="Get_Transient( 'recent_posts' )" />