Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the basket page code with PayPal and Amazon Pay active. It show the correct locations for the tokens.
<mvt:if expr="g.Action EQ 'RGRP'">
<mvt:assign name="g.Quantity" value="miva_variable_value('Quantity' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Name" value="miva_variable_value('Restore_Name' $ g.Restore_Counter)" />
<mvt:assign name="g.Restore_Link" value="miva_variable_value('Restore_Link' $ g.Restore_Counter)" />
<div class="x-messages x-messages--info">
<strong>&mvte:global:Restore_Name;</strong> has been removed from your cart. <a href="&mvte:global:Restore_Link;">Undo?</a>
</div>
<mvt:assign name="g.Restore_Counter" value="g.Restore_Counter + 1" />
</mvt:if>
<mvt:item name="customfields" param="Read_Basket('continue_url', l.settings:continue_url)" />
<mvt:if expr="l.settings:continue_url">
<mvt:assign name="g.continue_url" value="l.settings:continue_url" />
<mvt:else>
<mvt:assign name="g.continue_url" value="l.settings:urls:SFNT:auto" />
</mvt:if>
<mvt:if expr="l.settings:basket:empty">
<div class="x-messages x-messages--info">
<strong>Your shopping cart is currently empty.</strong> <a href="&mvt:global:continue_url;">Start Shopping</a>
</div>
<mvt:exit />
</mvt:if>
<section class="o-layout o-layout--wide t-basket" data-hook="basket" data-item-count="&mvt:global_minibasket:basket_count;" data-subtotal="&mvt:global_minibasket:formatted_total;">
<div class="o-layout__item u-width-12 u-width-8--l">
<table class="c-table-responsive t-basket__product-summary">
<caption class="u-text-left">
<h1 class="c-heading-delta u-text-bold u-text-uppercase">
<mvt:if expr="l.settings:global_minibasket:basket_count GT 1">
Your Cart: &mvte:global_minibasket:basket_count; Items
<mvt:else>
Your Cart: &mvte:global_minibasket:basket_count; Item
</mvt:if>
</h1>
</caption>
<thead class="c-table-responsive_thead u-text-left">
<tr class="c-table-responsive__row u-text-uppercase u-font-tiny u-color-gray-30">
<th class="c-table-responsive__cell" scope="col">Product</th>
<th class="c-table-responsive__cell" scope="col">Quantity</th>
<th class="c-table-responsive__cell u-text-right" scope="col">Subtotal</th>
<th class="c-table-responsive__cell u-text-right" scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<mvt:assign name="g.basket_subtotal" value="0" />
<mvt:foreach iterator="group" array="basket:groups">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:urls:BASK:auto_sep $ 'Action=ADPR&Product_Code=' $ l.settings:group:product:code $ '&Quantity=' $ l.settings:group:quantity" />
<tr class="c-table-responsive__row">
<td class="c-table-responsive__cell" scope="row" data-label="">
<div class="o-layout">
<div class="o-layout__item u-width-12 u-width-4--m u-width-3--l u-text-center">
<p><img src="&mvte:group:imagetypes:main;" alt="&mvt:group:name;" title="&mvt:group:name;"></p>
</div>
<div class="o-layout__item u-width-12 u-width-8--m u-width-9--l t-basket__product-details">
<a class="u-text-bold u-color-black" href="&mvte:group:link;" title="&mvt:group:name;" rel="nofollow">&mvt:group:name;</a><br>
<mvt:if expr="l.settings:group:upsold">
<br><span class="c-heading--subheading">(Special Offer)</span><br>
</mvt:if>
<p class="u-color-gray-30">
<span class="u-font-small">SKU: &mvt:group:code;</span><br>
<mvt:foreach iterator="discount" array="group:discounts">
<mvt:if expr="l.settings:discount:display">
<mvt:if expr="'sale' CIN l.settings:discount:descrip">
<mvt:assign name="l.settings:discount:descrip" value="'Savings'"/>
<mvt:else>
<mvt:assign name="l.settings:discount:descrip" value="l.settings:discount:descrip"/>
</mvt:if>
<span class="u-font-small u-flex u-color-red">
<span class="o-layout--grow">&mvt:discount:descrip;</span>
<span>&mvt:discount:formatted_discount;</span>
</span>
</mvt:if>
</mvt:foreach>
<mvt:assign name="l.settings:attr_ref" value="''" />
<mvt:foreach iterator="option" array="group:options">
<mvt:assign name="l.settings:group:option_counter" value="l.settings:group:option_counter + 1" />
<span class="u-font-small u-flex">
<mvt:if expr="l.settings:option:attmpat_id">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:template_code=' $ l.settings:option:attr_code" />
<mvt:assign name="l.settings:attr_ref" value="l.settings:option:attr_prompt" />
<mvt:else>
<mvt:assign name="l.settings:attr_ref" value="l.settings:option:attr_code" />
</mvt:if>
<mvt:if expr="l.settings:option:option_id">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:attr_ref $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:opt_code" />
<span class="o-layout--grow">&mvt:option:attr_prompt;: &mvt:option:opt_prompt;</span>
<mvt:if expr="l.settings:option:subtotal GT 0">
<span>&mvt:option:formatted_subtotal;</span>
</mvt:if>
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:attr_ref $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data" />
<span class="o-layout--grow">&mvt:option:attr_prompt;: &mvt:option:data;</span>
<mvt:if expr="l.settings:option:subtotal GT 0">
<span>&mvt:option:formatted_subtotal;</span>
</mvt:if>
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:attr_ref $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:data_long" />
<span class="o-layout--grow">&mvt:option:attr_prompt;: &mvt:option:data_long;</span>
<mvt:if expr="l.settings:option:subtotal GT 0">
<span>&mvt:option:formatted_subtotal;</span>
</mvt:if>
<mvt:else>
<mvt:assign name="l.settings:group:restore:link" value="l.settings:group:restore:link $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:code=' $ l.settings:attr_ref $ '&Product_Attributes[' $ l.settings:group:option_counter $ ']:value=' $ l.settings:option:attr_prompt" />
<span class="o-layout--grow">&mvt:option:attr_prompt;</span>
<mvt:if expr="l.settings:option:subtotal GT 0">
<span>&mvt:option:formatted_subtotal;</span>
</mvt:if>
</mvt:if>
</span>
<mvt:foreach iterator="discount" array="option:discounts">
<mvt:if expr="l.settings:discount:display">
<span class="u-color-red o-layout--grow">&mvt:discount:descrip;</span>
<span class="u-color-red">&mvt:discount:formatted_discount;</span>
</mvt:if>
</mvt:foreach>
</mvt:foreach>
</p>
<mvt:if expr="l.settings:group:subterm_id">
<p>Subscription: &mvte:group:productsubscriptionterm:descrip;</p>
</mvt:if>
<mvt:if expr="l.settings:group:product:id AND (NOT l.settings:group:product:productsubscriptionsettings:enabled OR NOT l.settings:group:product:productsubscriptionsettings:mandatory)">
<p><a class="u-color-gray-50 u-font-small u-text-bold u-text-uppercase" href="&mvte:urls:WISH:secure_sep;Action=MPWL&Group_ID=&mvta:group:group_id;">&#8942; Save to Wish List</a></p>
</mvt:if>
</div>
</div>
</td>
<td class="c-table-responsive__cell" data-label="Quantity">
<mvt:if expr="l.settings:group:upsold">
<p>&mvt:group:quantity;</p>
<mvt:else>
<form class="t-basket-update" method="post" action="&mvte:urls:BASK:auto;" data-hook="group-&mvte:group:group_id;">
<fieldset>
<legend>&mvt:group:name; Quantity</legend>
<input type="hidden" name="Action" value="QTYG" />
<input type="hidden" name="Basket_Group" value="&mvte:group:group_id;" />
<input type="hidden" name="Old_Screen" value="BASK" />
<input type="hidden" name="Offset" value="&mvte:global:Offset;" />
<input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
<input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
<input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
<input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
<input type="hidden" name="Restore_Name" value="&mvt:group:name;">
<input type="hidden" name="Restore_Link" value="&mvte:group:restore:link;">
<ul class="c-form-list">
<li class="c-form-list__item">
<label class="u-hide-visually" for="l-quantity-&mvte:group:group_id;">Quantity</label>
<div class="x-quantify c-control-group" data-hook="quantify">
<button class="c-button c-control-group__button u-bg-white u-color-gray-30 u-icon-subtract" data-action="decrement"></button>
<input id="l-quantity-&mvte:group:group_id;" class="c-form-input c-control-group__field u-text-bold u-text-center" data-group="group-&mvte:group:group_id;" data-hook="group-quantity" type="tel" name="Quantity" value="&mvt:group:quantity;" required>
<button class="c-button c-control-group__button u-bg-white u-color-gray-30 u-icon-add" data-action="increment"></button>
</div>
</li>
</ul>
</fieldset>
</form>
</mvt:if>
</td>
<td class="c-table-responsive__cell u-text-right" data-label="Subtotal">
<p class="c-heading-echo">
<span class="u-text-bold u-block">&mvt:group:formatted_subtotal_comprehensive;</span>
<mvt:assign name="g.basket_subtotal" value="g.basket_subtotal + l.settings:group:subtotal_comprehensive" />
<mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
<s class="c-heading--subheading u-block">&mvt:group:formatted_subtotal_base_price;</s>
</mvt:if>
<mvt:if expr="l.settings:group:upsold">
<span class="c-heading--subheading u-block">&nbsp;</span>
</mvt:if>
</p>
</td>
<td class="c-table-responsive__cell u-font-small u-text-right">
<p>
<a class="c-button c-button--hollow c-button--small u-bg-white u-color-gray-20 t-basket__product-remove" href="&mvte:urls:BASK:auto_sep;Action=RGRP&Basket_Group=&mvta:group:group_id;&Restore_Name=&mvta:group:name;&Restore_Link=&mvta:group:restore:link;">
<span class="u-color-gray-30 u-icon-cross"></span>
</a>
</p>
</td>
</tr>
</mvt:foreach>
</tbody>
</table>
<ul class="o-list-inline u-text-bold u-text-uppercase">
<li class="o-list-inline__item">
<a class="u-color-gray-30" href="&mvte:urls:WISH:secure_sep;Action=MAWL" title="Save Cart for Later"><span class="u-font-small u-icon-history"></span>&nbsp;<span class="u-font-tiny">Save Cart for Later</span></a>
</li>
<li class="o-list-inline__item">
<a class="u-color-gray-30" href="&mvte:urls:BASK:auto_sep;Clear_Cart=1" title="Delete Entire Cart"><span class="u-font-small u-icon-remove"></span>&nbsp;<span class="u-font-tiny">Delete Entire Cart</span></a>
</li>
</ul>
<br>
<p class="u-text-bold u-font-small u-text-uppercase">
<a class="u-color-black" href="&mvt:global:continue_url;" title="Continue Shopping"><span class="u-icon-arrow-left"></span>&nbsp;Continue Shopping</a>
</p>
<hr class="c-keyline">
</div>
<aside class="o-layout__item u-width-12 u-width-4--l">
<mvt:do file="g.Module_Store_Module_Currency" name="l.settings:basket:formatted_subtotal" value="CurrencyModule_AddFormatting(g.Store:currncy_mod, g.basket_subtotal)" />
<table class="c-table-simple t-basket__order-summary">
<thead>
<tr class="c-table-simple__row">
<td class="c-table-simple__cell">
<span class="c-heading-echo u-text-bold u-text-uppercase">Order Summary</span>
</td>
</tr>
</thead>
<tbody class="u-font-small u-text-uppercase u-text-bold">
<tr class="c-table-simple__row">
<td class="c-table-simple__cell c-table-simple__cell--standard u-flex o-layout--justify-between">
<span>
<mvt:if expr="l.settings:global_minibasket:basket_count GT 1">
<span class="u-color-gray-30">Subtotal:</span> &mvte:global_minibasket:basket_count; Items
<mvt:else>
<span class="u-color-gray-30">Subtotal:</span> &mvte:global_minibasket:basket_count; Item
</mvt:if>
</span>
<span>&mvt:basket:formatted_subtotal;</span>
</td>
</tr>
<mvt:foreach iterator="charge" array="basket:charges">
<tr class="c-table-simple__row u-color-gray-30">
<td class="c-table-simple__cell c-table-simple__cell--standard u-flex o-layout--justify-between">
<span>&mvt:charge:descrip;</span>
<span>&mvt:charge:formatted_disp_amt;</span>
</td>
</tr>
</mvt:foreach>
<tr class="c-table-simple__row u-color-gray-30">
<td class="c-table-simple__cell c-table-simple__cell--standard u-flex o-layout--justify-between">
<span>Shipping</span>
<span>
<a class="u-color-gray-30" data-mini-modal data-mini-modal-type="inline" data-mini-modal-content="data-shipping-estimator" data-mini-modal-openCallback="estimateShipping" href="">Estimate</a>
</span>
</td>
</tr>
<mvt:foreach iterator="coupon" array="basket:coupons">
<tr class="c-table-simple__row">
<td class="c-table-simple__cell c-table-simple__cell--standard u-flex o-layout--justify-between">
<form method="post" action="&mvte:urls:BASK:auto;">
<fieldset>
<legend>Remove Promo Code &mvt:coupon:code;</legend>
<ul class="c-form-list">
<li class="c-form-list__item c-form-list__item--full">
<input type="hidden" name="Action" value="RCPN"/>
<input type="hidden" name="Coupon_Code" value="&mvte:coupon:code;"/>
<button class="c-button c-button--clear u-bg-transparent u-color-red" type="submit">&mvt:coupon:code; <span class="u-icon-remove"></span></button>
</li>
</ul>
</fieldset>
</form>
<mvt:if expr="NOT ISNULL l.settings:coupon:descrip">
<span>&mvt:coupon:descrip;</span>
</mvt:if>
</td>
</tr>
</mvt:foreach>
<tr class="c-table-simple__row">
<td class="c-table-simple__cell c-table-simple__cell--standard">
<input id="basket-coupon-form-toggle" class="u-hidden t-basket_basket-coupon-form-toggle" type="checkbox">
<label class="u-flex o-layout--justify-between o-layout--align-center u-text-bold u-text-uppercase" for="basket-coupon-form-toggle">
<span>Add Promo Code</span>
<span class="u-icon-add u-font-tiny"></span>
</label>
<form class="t-basket_coupon-form" method="post" action="&mvte:urls:_self:auto;">
<fieldset>
<legend>Add Promo Code</legend>
<input type="hidden" name="Action" value="ACPN" />
<ul class="c-form-list">
<li class="c-form-list__item c-form-list__item--full c-control-group u-flex">
<label class="u-hide-visually" for="Coupon_Code">Add Promo Code</label>
<input id="Coupon_Code" class="c-form-input c-control-group__field u-text-regular" type="text" name="Coupon_Code" placeholder="Enter Promo Code" required>
<input class="c-button c-control-group__button c-button--large u-border-none u-text-uppercase" type="submit" value="Apply">
</li>
</ul>
</fieldset>
</form>
</td>
</tr>
<tr>
<td class="c-table-simple__cell">
<br>
<div class="u-flex o-layout--align-center o-layout--justify-between c-heading-delta u-text-bold u-text-uppercase">
<span class="u-font-tiny">Current Total</span>
<span>&mvt:basket:formatted_total;</span>
</div>
</td>
</tr>
<tr>
<td>
<br>
<a class="c-button c-button--full c-button--huge u-bg-black u-color-white u-text-bold" href="&mvte:urls:OINF:auto;">Secure Checkout</a>
<br>
<hr class="c-keyline">
<mvt:comment>
<!-- If you are using PayPal Express, this is where the `PaypalExButton` item goes. -->
</mvt:comment>
<mvt:item name="PaypalExButton"/>
<br>
<hr class="c-keyline">
<mvt:comment>
<!-- If you are using Amazon Pay, this is where the `"amazonpay_button" param="body"` item goes. -->
</mvt:comment>
<p class="u-text-bold">Have an Amazon account?</p>
<mvt:item name="amazonpay_button" param="body" />
<br>
<hr class="c-keyline">
</td>
</tr>
<tr>
<td>
<mvt:item name="readytheme" param="contentsection( 'helpful_info' )" />
</td>
</tr>
</tbody>
</table>
<mvt:item name="shipestimate" />
</aside>
</section>
<mvt:comment>
/**
* This controls the data return for the AJAX add-to-cart call.
*/
</mvt:comment>
<mvt:if expr="g.ajax EQ 1">
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
</head>
<body id="js-&mvte:page:code;">
<mvt:item name="readytheme" param="contentsection( 'mini_basket' )" />
</body>
</html>
<mvt:exit>
</mvt:if>
<mvt:comment>
/**
* This controls the `Delete Entire Cart` function.
*/
</mvt:comment>
<mvt:if expr="g.Clear_Cart">
<mvt:do file="g.Module_Library_DB" name="l.settings:result" value="Basket_Reset_Contents( g.Basket )" />
<mvt:assign name="l.result" value="miva_output_header( 'Location', l.settings:urls:BASK:auto )" />
<mvt:assign name="l.result" value="miva_output_header( 'Status', '302 Moved Temporarily' )" />
</mvt:if>
<mvt:item name="html_profile" />
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="&mvt: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" param="css_list" />
<mvt:item name="head" param="head_tag" />
<mvt:comment>
<!-- If you are using Amazon Pay, this is where the `amazonpay` and `"amazonpay_button" param="head"` items go. -->
</mvt:comment>
<mvt:item name="amazonpay" />
<mvt:item name="amazonpay_button" param="head" />
</head>
<body id="js-&mvte:page:code;" class="o-site-wrapper t-page-&mvt:global:pageClass;">
<mvt:item name="hdft" param="global_header" />
<section class="o-layout">
<div class="o-layout__item">
<mvt:item name="hdft" param="header" />
<mvt:item name="readytheme" param="contentsection( 'messages' )" />
<mvt:comment>
<!-- If you are using PayPal Express, this is where the `PaypalErrorMsg` item goes. -->
</mvt:comment>
<mvt:item name="PaypalErrorMsg"/>
</div>
</section>
<mvt:item name="basket" />
<section class="o-layout">
<div class="o-layout__item">
<mvt:item name="hdft" param="footer" />
</div>
</section>
<mvt:item name="hdft" param="global_footer" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.