Fixed display of shipping message

master
Mark Moffat 2020-01-04 17:56:30 +10:30
parent 11302e2255
commit c73d67b923
4 changed files with 5 additions and 7 deletions

View File

@ -488,7 +488,7 @@ function updateCartDiv(){
var shippingTotalAmt = numeral(session.totalCartShipping).format('0.00'); var shippingTotalAmt = numeral(session.totalCartShipping).format('0.00');
var shippingTotal = `${session.shippingMessage} :<strong id="shipping-amount">${result.currencySymbol}${shippingTotalAmt}</strong>`; var shippingTotal = `${session.shippingMessage} :<strong id="shipping-amount">${result.currencySymbol}${shippingTotalAmt}</strong>`;
if(session.totalCartShipping === 0){ if(session.totalCartShipping === 0){
shippingTotal = `<strong id="shipping-amount">${session.shippingMessage}</strong>`; shippingTotal = `<span id="shipping-amount">${session.shippingMessage}</span>`;
} }
// If the cart has contents // If the cart has contents

File diff suppressed because one or more lines are too long

View File

@ -53,13 +53,11 @@
<div class="cart-contents-shipping col-md-12 no-pad-right"> <div class="cart-contents-shipping col-md-12 no-pad-right">
{{#ifCond @root.session.totalCartShipping '>' 0}} {{#ifCond @root.session.totalCartShipping '>' 0}}
<div class="text-right"> <div class="text-right">
{{ @root.__ "Shipping" }} {{@root.session.shippingMessage}}: <strong id="shipping-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong>
<strong id="shipping-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong>
</div> </div>
{{else}} {{else}}
<div class="text-right"> <div class="text-right">
{{ @root.__ "Shipping" }} <span id="shipping-amount">{{@root.session.shippingMessage}}</span>
<strong id="shipping-amount">FREE</strong>
</div> </div>
{{/ifCond}} {{/ifCond}}
<div class="text-right"> <div class="text-right">

View File

@ -17,7 +17,7 @@
{{#ifCond @root.session.totalCartShipping '>' 0}} {{#ifCond @root.session.totalCartShipping '>' 0}}
<li class="list-group-item">{{@root.session.shippingMessage}} <span class="float-right"><strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong></span></li> <li class="list-group-item">{{@root.session.shippingMessage}} <span class="float-right"><strong>{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong></span></li>
{{else}} {{else}}
<li class="list-group-item">FREE shipping <span class="float-right"></li> <li class="list-group-item">{{@root.session.shippingMessage}}</li>
{{/ifCond}} {{/ifCond}}
</ul> </ul>
{{/unless}} {{/unless}}