View miva-sort-and-update-attribute-option-display-order.xml
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Product_Code, l.settings:product )" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="AttributeList_Load_Product( l.settings:product:id, l.settings:product:attributes )" />
<mvt:foreach iterator="attribute" array="product:attributes">
<mvt:do file="g.Module_Library_DB" name="l.success" value="OptionList_Load_Attribute( l.settings:attribute:id, l.settings:attribute:options )" />
<mvt:comment>
Only Sort Length Attributes
</mvt:comment>
<mvt:if expr="l.settings:attribute:code NE 'length'">
View miva-preload-attribute-options-from-variant-part-product-code.xml
<mvt:if expr="g.Variant_Product_Code">
<mvt:comment>
Pass the Variant Part Product Code, and Load the Attributes & Options for it
/store/variant-attributes.html?Variant_Product_Code=shirt_small_red
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Variant_Product_Code, l.settings:variant_product )" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantPartList_Load_Part( l.settings:variant_product:id, l.settings:variant_product:parts )" />
<mvt:foreach iterator="part" array="variant_product:parts">
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID( l.settings:part:product_id, l.settings:part:master_product )" />
<mvt:assign name="l.settings:variant_product:adpr_data:product_code" value="l.settings:part:master_product:code" />
View miva-load-variants-attributes-and-options.xml
<mvt:if expr="g.Product_Code AND g.Variant_ID">
<mvt:comment>
Pass in a Product_Code and a Variant_ID to load that variant's attribute & option data
Example
/store/variant-attributes.html?Product_Code=shirt&Variant_ID=29522
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( g.Product_Code, l.settings:product )" />
<mvt:assign name="l.settings:product:variant_id" value="g.Variant_ID" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantList_Load_Variant( l.settings:product:id, g.variant_id, l.settings:product:variants )" />
<mvt:foreach iterator="variant" array="product:variants">
View miva-levels-menu-aim-for-tablet-alternative.js
(function Mega_Menu(){
var init = function(){
var is_mobile = $('html').hasClass('mobile');
if( is_mobile ){
$('.nav-item-2').on('click', function(e){
var item = this,
$group = get_$group_from_item(item);
if( $group.is(':visible') ){
View miva-load-product-meta-values.xml
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code( 'miva-test_master-product', l.settings:product )" />
<mvt:do file="g.Module_Root $ '/modules/component/cmp-mv-prodctgy-meta.mvc'" name="l.success" value="METAValueList_Load_Product(l.settings:product:id, l.settings:product:meta_items)" />
<mvt:foreach iterator="meta_item" array="product:meta_items">
<mvt:if expr="l.settings:meta_item:name EQ 'keywords'">
<mvt:assign name="l.settings:product:meta_keywords" value="l.settings:meta_item:value" />
<mvt:elseif expr="l.settings:meta_item:name EQ 'description'">
<mvt:assign name="l.settings:product:meta_description" value="l.settings:meta_item:value" />
</mvt:if>
</mvt:foreach>
View Miva-AttributeMachine-on-OUSM.md

Add AttributeMachine functionality to OUSM

OUSM does not have the same ability to show/hide variants & out-of-stock products in the same way that the PROD page does. PROD is able to do it by leveraging AttributeMachine, and AttributeMachine requires certain <form/> elements & names in that don't exist on OUSM.

We can use the upsell-data on OUSM to output ADPR-style forms, add AttributeMachine to them, and then on submit/continue we can use JavaScript re-map the PROD/ADPR form-data to the OUSM/AUPM form-data's requirements.

Assign these extra items to OUSM:

Attribute Machine (code: attributemachine)
View PROD--variables-mvt.xml
<mvt:if expr="g.variant_id LE 0">
<mvt:assign name="g.variant_id" value="0" />
</mvt:if>
<script>
var variant_id = &mvtj:global:variant_id;;
var product_code = '&mvtj:product:code;';
</script>
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
View miva-mvtcall-response-headers.xml
<mvt:call action="'https://www.example.com/'" method="'GET'">
<mvt:assign name="l.header_counter" value="1" />
<mvt:while expr="l.header_counter LT s.callnumberofheaders">
<mvt:assign name="l.result" value="miva_array_insert_var( l.response_headers, miva_variable_value( 's.callreturnheader' $ l.header_counter ), -1 )" />
<mvt:assign name="l.header_counter" value="l.header_counter + 1" />
</mvt:while>
</mvt:call>
<mvt:eval expr="glosub(miva_array_serialize(l.response_headers), ',', '<br>')" />
View result.txt
Variable Scope Tests
---
Page Render:
l.settings:variable=
g.variable=Hello World
ReadyTheme Content Section:
l.settings:rt_variable=Hello World
g.rt_variable=Hello World