Skip to content

Instantly share code, notes, and snippets.

@influxweb
Created August 31, 2015 18:12
Show Gist options
  • Save influxweb/b0a80a753ac9c8f3ce98 to your computer and use it in GitHub Desktop.
Save influxweb/b0a80a753ac9c8f3ce98 to your computer and use it in GitHub Desktop.
ReadyTheme updates for attribute pricing in the mini-baskets and checkout baskets.
Suivant and Iron & Wool Mini-Basket
Replace:
<mvt:if expr="l.settings:item:subtotal_base_price OR l.settings:item:subtotal">
<mvt:if expr="l.settings:item:subtotal_base_price NE l.settings:item:subtotal">
<s>&mvt:item:formatted_subtotal_base_price;</s><br />
</mvt:if>
<strong>&mvt:item:formatted_subtotal;</strong>
<mvt:else>
<strong>&mvt:item:formatted_subtotal_comprehensive;</strong>
</mvt:if>
With:
<strong>&mvt:item:formatted_subtotal;</strong><br />
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
&mvt:option:formatted_subtotal;<br />
<mvt:else>
&nbsp;<br />
</mvt:if>
</mvt:foreach>
Suivant and Iron & Wool Basket on OCST, OSEL, and OPAY
Replace:
<mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
<s>&mvt:group:formatted_subtotal_base_price;</s><br />
</mvt:if>
&mvt:group:formatted_subtotal;
With:
<mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
&mvt:group:formatted_subtotal;<br />
<small><s>&mvt:group:formatted_subtotal_base_price;</s><small><br />
<mvt:else>
&mvt:group:formatted_subtotal;<br />
<small>&nbsp;</small><br />
</mvt:if>
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
&mvt:option:formatted_subtotal;<br />
<mvt:else>
&nbsp;<br />
</mvt:if>
</mvt:foreach>
<mvt:foreach iterator="discount" array="group:discounts">
<mvt:if expr="l.settings:discount:display">
&nbsp;<br />
</mvt:if>
</mvt:foreach>
<mvt:foreach iterator="discount" array="option:discounts">
<mvt:if expr="l.settings:discount:display">
&nbsp;<br />
</mvt:if>
</mvt:foreach>
Optics and Coustic Mini-Basket
Replace:
<div id="js-mini-basket-container" class="column whole small-half medium-two-fifths mini-basket-container">
<div class="row mini-basket-content" data-itemcount="&mvt:global_minibasket:basket_count;" data-subtotal="&mvt:basket:formatted_total;">
<mvt:if expr="l.settings:global_minibasket:empty">
<h5 class="column whole align-center">Your cart is currently empty.</h5>
<mvt:else>
<h5 class="column whole uppercase">Shopping Cart Summary</h5>
<div class="column whole mini-basket-table-wrap custom-scrolling">
<mvt:foreach iterator="item" array="global_minibasket:items">
<div class="row mini-basket-row">
<div class="column hide medium-show medium-one-fifth">
<mvt:if expr="NOT ISNULL l.settings:item:imagetypes:main">
<img src="&mvte:item:imagetypes:main;" alt="&mvt:item:name;" title="&mvt:item:name;" />
<mvt:else>
&nbsp;
</mvt:if>
</div>
<div class="column three-fourths medium-three-fifths">
<span class="semibold"><a href="http://&mvt:global:domain:name;/&mvt:seo_settings:prod_lit;&mvt:seo_settings:url_delim;&mvt:item:code;.&mvt:seo_settings:suffix;" title="&mvt:item:name;">&mvt:item:name;</a></span>
<mvt:if expr="l.settings:item:upsold">
&nbsp;(Special Offer)
</mvt:if>
<br /><span class="gray">Code: &mvt:item:code;</span>
<br />
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:option_id">
&mvt:option:attr_prompt;: &mvt:option:opt_prompt;
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
&mvt:option:attr_prompt;: &mvt:option:data;
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
&mvt:option:attr_prompt;: &mvt:option:data_long;
<mvt:else>
&mvt:option:attr_prompt;
</mvt:if>
<br />
</mvt:foreach>
<span class="semibold">Quantity: &mvte:item:quantity;</span>
</div>
<div class="column one-fourth medium-one-fifth align-right npl semibold">
&mvt:item:formatted_subtotal_comprehensive;
</div>
</div>
</mvt:foreach>
</div>
<h5 class="column whole align-right">Subtotal: <span class="semibold">&mvt:global_minibasket:formatted_total;</span></h5>
<div class="column half align-center"><a href="&mvt:global:sessionurl;Screen=BASK&amp;Store_Code=&mvta:store:code;" title="View Cart" class="button button-block button-normal-font button-square bg-gray uppercase">View Cart</a></div>
<div class="column half align-center"><a href="&mvt:global:secure_sessionurl;Screen=OINF" title="Checkout" class="button button-block button-normal-font button-square bg-aqua uppercase">Checkout</a></div>
</mvt:if>
</div>
<div class="row">
<div class="column whole button button-square align-center bg-navy">&#9650;</div>
</div>
</div>
With:
<div id="js-mini-basket-container" class="column whole small-half medium-two-fifths mini-basket-container">
<div class="row mini-basket-content" data-itemcount="&mvt:global_minibasket:basket_count;" data-subtotal="&mvt:basket:formatted_total;">
<mvt:if expr="l.settings:global_minibasket:empty">
<h5 class="column whole align-center">Your cart is currently empty.</h5>
<mvt:else>
<h5 class="column whole uppercase">Shopping Cart Summary</h5>
<div class="column whole mini-basket-table-wrap custom-scrolling">
<mvt:foreach iterator="item" array="global_minibasket:groups">
<div class="row mini-basket-row">
<div class="column hide medium-show medium-one-fifth">
<mvt:if expr="NOT ISNULL l.settings:item:imagetypes:main">
<img src="&mvte:item:imagetypes:main;" alt="&mvt:item:name;" title="&mvt:item:name;" />
<mvt:else>
&nbsp;
</mvt:if>
</div>
<div class="column three-fourths medium-three-fifths">
<span class="semibold"><a href="&mvte:urls:PROD:auto_sep;Product_Code=&mvta:item:code;" title="&mvt:item:name;">&mvt:item:name;</a></span>
<mvt:if expr="l.settings:item:upsold">
&nbsp;(Special Offer)
</mvt:if>
<br /><span class="gray">Code: &mvt:item:code;</span>
<br />
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:option_id">
&mvt:option:attr_prompt;: &mvt:option:opt_prompt;
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
&mvt:option:attr_prompt;: &mvt:option:data;
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
&mvt:option:attr_prompt;: &mvt:option:data_long;
<mvt:else>
&mvt:option:attr_prompt;
</mvt:if>
<br />
</mvt:foreach>
<span class="semibold">Quantity: &mvte:item:quantity;</span>
</div>
<div class="column one-fourth medium-one-fifth align-right npl semibold">
&mvt:item:formatted_subtotal;<br />
&nbsp;<br />
<mvt:foreach iterator="option" array="item:options">
<mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
&mvt:option:formatted_subtotal;<br />
<mvt:else>
&nbsp;<br />
</mvt:if>
</mvt:foreach>
</div>
</div>
</mvt:foreach>
</div>
<h5 class="column whole align-right">Subtotal: <span class="semibold">&mvt:global_minibasket:formatted_total;</span></h5>
<div class="column half align-center"><a href="&mvt:global:sessionurl;Screen=BASK&amp;Store_Code=&mvta:store:code;" title="View Cart" class="button button-block button-normal-font button-square bg-gray uppercase">View Cart</a></div>
<div class="column half align-center"><a href="&mvt:global:secure_sessionurl;Screen=OINF" title="Checkout" class="button button-block button-normal-font button-square bg-aqua uppercase">Checkout</a></div>
</mvt:if>
</div>
<div class="row">
<div class="column whole button button-square align-center bg-navy">&#9650;</div>
</div>
</div>
Optics and Coustic Basket on OCST, OSEL, and OPAY
Replace:
<mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
<s>&mvt:group:formatted_subtotal_base_price;</s><br />
</mvt:if>
&mvt:group:formatted_subtotal;
With:
<mvt:if expr="l.settings:group:subtotal_base_price NE l.settings:group:subtotal">
&mvt:group:formatted_subtotal;<br />
<small><s>&mvt:group:formatted_subtotal_base_price;</s><small><br />
<mvt:else>
&mvt:group:formatted_subtotal;<br />
<small>&nbsp;</small><br />
</mvt:if>
<mvt:foreach iterator="option" array="group:options">
<mvt:if expr="l.settings:option:subtotal_base_price OR l.settings:option:subtotal">
&mvt:option:formatted_subtotal;<br />
<mvt:else>
&nbsp;<br />
</mvt:if>
</mvt:foreach>
<mvt:foreach iterator="discount" array="group:discounts">
<mvt:if expr="l.settings:discount:display">
&nbsp;<br />
</mvt:if>
</mvt:foreach>
<mvt:foreach iterator="discount" array="option:discounts">
<mvt:if expr="l.settings:discount:display">
&nbsp;<br />
</mvt:if>
</mvt:foreach>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment