MivaLearn

Public Snippets 207

Manage Quotes Link

<a href="&mvte:urls:QUOH:auto;">View Quote History</a>

Manage Quotes Item

<mvt:item name="request_quote" param="request_quote" />

Manage Quotes Mini Basket

<mvt:if expr="(l.settings:global_minibasket:active_quote EQ 1) AND (g.Basket:cust_id)">
	<a href="&mvte:urls:QUOH:auto;">View Your Active Quotes</a>
</mvt:if>

Manage Quotes LOGN

<mvt:if expr="NOT ISNULL g.QuoteCode">
	<mvt:assign name="l.settings:url" value="l.settings:urls:QUOT:secure" />
<mvt:elseif expr="g.Customer_Temporary_Password">
	<mvt:assign name="l.settings:url" value="l.settings:urls:CPWD:secure" />
<mvt:elseif expr="g.Order">
	<mvt:assign name="l.settings:url" value="l.settings:urls:OINF:secure" />
<mvt:else>
	<mvt:assign name="l.settings:url" value="l.settings:urls:ACLN:secure" />
</mvt:if>
<form method="post" action="&mvte:url;">
	<fieldset>
		

Manage Quotes Options Loop

<mvt:if expr="l.settings:option:attr_code EQ 'Part of Quote'">
	<mvt:assign name="l.settings:option:attr_prompt" value="l.settings:option:attr_code" />
	<mvt:assign name="g.quote_item" value="'1'" />
<mvt:else>
	<mvt:assign name="l.settings:option:attr_prompt" value="l.settings:option:attr_prompt" />
</mvt:if>

Global Footer Fragment

<mvt:if expr="ISNULL g.Session:shadows:checkout_hidden">
    <mvt:fragment code="global_footer" />
</mvt:if>

Global Header Fragment

<mvt:if expr="ISNULL g.Session:shadows:checkout_hidden">
    <mvt:fragment code="global_header" />
</mvt:if>

Affirm Configuration Version 10.10.00

<mvt:if expr="l.settings:page:code EQ 'BASK'">
	<mvt:item name="mvaffirm_aslowas" param="amount:basket:total" />
<mvt:elseif expr="NOT ISNULL l.settings:product:id">
	<mvt:item name="mvaffirm_aslowas" param="product:product" />
</mvt:if>

Affirm Configuration Version 10.09.02

<mvt:if expr="l.settings:page:code EQ 'BASK'">
	<mvt:item name="mvaffirm_aslowas" param="amount:basket:total" />
	<hr class="c-keyline">
</mvt:if>
<mvt:if expr="l.settings:page:code EQ 'CTGY'">
	<br>
	<hr class="c-keyline">
	<mvt:item name="mvaffirm_aslowas" param="product:product" />
</mvt:if>
<mvt:if expr="l.settings:page:code EQ 'PLST'">
	<br>
	<hr class="c-keyline">
	<mvt:item name="mvaffirm_aslowas" param="product:product" />
</mvt:if>
<mvt:if expr="l.settings:page:code EQ 'PR

10.09.02 Basket ID Update

<mvt:if expr="g.Basket:basket_id GT 0">
	<p class="u-color-gray-600"><span class="u-icon-cart-empty" aria-hidden="true"></span>Basket ID: &mvte:global:Basket:basket_id;</p>
</mvt:if>

MMT VS Code Snippets

MMT Snippets streamline the development process by providing quick access to commonly used commands and phrases within VS Code. These snippets are designed to enhance your efficiency and productivity when using MMT with VS Code. To use you will have to write the command in a file or VS code window, but then you can copy/paste the final command into the terminal.
{
	// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
	// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
	// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and

Miva - Add & Remove Basket Charges

<mvt:if expr="g.Delete_Charge">
	<h2>Delete Charge</h2>
	<mvt:do file="g.Module_Library_DB" name="l.gone" value="BasketCharge_Delete_All_Type(g.Basket:basket_id, 'CUSTOM_CHARGE')" />
</mvt:if>


<mvt:if expr="g.Add_Charge">
	<mvt:assign name="l.basket_charge:basket_id" value="g.Basket:basket_id" />
	<mvt:assign name="l.basket_charge:module_id" value="0" />
	<mvt:assign name="l.basket_charge:type" value="'CUSTOM_CHARGE'" />
	<mvt:assign name="l.basket_charge:descrip" value="'Custom Char

Miva - Load Custom Field in URI Template

<mvt:do file="g.Module_Library_DB" name="l.loaded_module" value="Module_Load_Code_Cached( 'customfields', l.customfields_module )" />
<mvt:if expr="l.loaded_module">
	<mvt:do file="g.Module_Root $ l.customfields_module:module" name="l.settings:product:brand" value="Module_Product_Field_Value( l.customfields_module, l.settings:product:id, 'brand' )" />
</mvt:if>

<mvt:if expr="l.settings:product:brand">
	/product/&mvts:product:brand;/&mvts:product:name;.html
<mvt:else>
	/product/&mvts:pro

CTGY PageBuilder

<mvt:comment>Ability to have a page with the same code as the current category code and use that page via page builder for specific category landing pages/layouts</mvt:comment>
<mvt:do file="g.Module_Feature_TUI_DB" name="l.settings:Page_Load_CodeOK" value="Page_Load_Code( g.Category_Code, l.settings:category:pagebuilder_cat_page )" />
<mvt:if expr="l.settings:Page_Load_CodeOK">
	<mvt:capture variable="l.settings:category:pagebuilder_design"><mvt:do name="l.settings:foundPageOK" file="g.Modul

Retrieve PO Description

<mvt:comment> Load order payments </mvt:comment> 
<mvt:do file="g.module_library_db" name="l.success" value="OrderPaymentList_Load_Order(l.settings:order:id, l.settings:orderpayments)" /> 

<mvt:comment> Set delimiter variables </mvt:comment> 
<mvt:assign name="g.colon" value="':'" /> 
<mvt:assign name="g.comma" value="','" /> 
<mvt:assign name="g.equal" value="'='" /> 

<mvt:comment> Loop through payments array to find the payment data </mvt:comment> 
<mvt:foreach iterator="payment" ar

Update Basket Item Weight

<mvt:assign name="l.settings:basketcontents" value="l.settings:basket:groups" />
<mvt:assign name="l.settings:ttl_automatically_updated_items_in_cart" value="0" />
<mvt:foreach iterator="group" array="basketcontents">

    <mvt:comment>Load product as it is right now, Runtime means only Active products</mvt:comment>
    <mvt:do name="l.loadedProductOK" file="g.Module_Library_DB" value="Runtime_Product_Load_Code( l.settings:group:code, l.settings:group:current_product_values )" />

    <mv