MivaLearn

Public Snippets 212

multi-domain-uri

<mvt:comment> ============================================= </mvt:comment>
<mvt:comment> Load URL Contexts (each context = a domain)   </mvt:comment>
<mvt:comment> ============================================= </mvt:comment>

<mvt:do file="g.Module_Feature_URI_UT" name="l.success" 
        value="Store_URL_Context_List( l.settings:contexts )" />

<mvt:comment> Get the current domain's context for reference </mvt:comment>
<mvt:do file="g.Module_Feature_URI_UT" name="g.current_context_id" 

NavigationSet_Add

<NavigationSet_Add>
    <Code><![CDATA[primary_navigation]]></Code>
    <Name><![CDATA[Primary Site Navigation Bar]]></Name>
    <Description><![CDATA[]]></Description>
    <Template>![CDATA[]]</Template>
    <Notes>#Set_Current_Time#</Notes>
    <Layout>Horizontal Drop-Down</Layout>
    <Items>
        <Item>
            <Active>true</Active>
            <Name><![CDATA[Shop All]]></Name>
            <Link type="Page" target="_self"><![CDATA[CTLG]]></Link>
        </Item>
        <I

miva_array_merge Example

<!-- Populate Source array -->
<mvt:capture variable="l.outfit_products_json">
[
    {
        "name": "Hat",
        "color": "Black",
        "price": 19.99
    },
    {
        "name": "T-Shirt",
        "color": "Blue",
        "price": 14.99
    },
    {
        "name": "T-Shirt",
        "color": "Blue",
        "price": 15.99
    },
    {
        "name": "Pants",
        "color": "Blue",
        "price": 39.99
    },
    {
        "name": "Socks",
        "color":

Custom CTGY PageBuilder Header

Custom code added to the CTGY template to render a page with the same value as the current category custom field of `pagebuilder_code` and use that page via page builder for specific category landing pages/layouts.
<div class="o-layout__item">
<mvt:comment>
|
|	Ability to have a page with the same value as the current category custom field of `pagebuilder_code`
|	and use that page via page builder for specific category 
|	landing pages/layouts.
|
</mvt:comment>
<mvt:item name="customfields" param="Read_Category_Code( g.Category_Code, 'pagebuilder_code', l.settings:category:customfield_values:customfields:pagebuilder_code )" />
<mvt:do file="g.Module_Feature_TUI_DB" name="l.settings:Page_Load_CodeO

Page Builder Category Header

A custom layout within the Miva admin under User Interface > Templates > Layouts. This layout includes custom template code that supports adding PageBuilder Flex Components. Be sure to assign the `flex` and `sequence` items and any other items needed for the Global Header and Footer.
<mvt:assign name="l.settings:ui:global_header:omit_page_title" value="1" />

<mvt:if expr="g.Function EQ 'PageBuilderPage_Preview'">
<mvt:item name="html_profile" />
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<base href="&mvte:global:basehref;"/>
	<mvt:if expr="NOT ISNULL l.settings:page:title">
		<title>&mvt:page:title;</title>
	<mvt:else>
		<title>&mvt:store:name;: &mvt:page:name;</title>
	</mvt:if>
	<mvt:item name="head" 

precision-pricing-weight-api

{ 
    "success": 1, 
    "data": [ 
        { 
            "order_id": 8837362, 
            "line_id": 428, 
            "group_id": 428, 
            "parent_id": 0, 
            "status": 0, 
            "subscrp_id": 0, 
            "subterm_id": 0, 
            "shpmnt_id": 0, 
            "rma_id": 0, 
            "product_id": 1208, 
            "dt_instock": 0, 
            "code": "RFS01174", 
            "name": "\u002312 PROZ\u2122 SD T3 HI-LO THREADED HEX CAP ROOFING

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>