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 shippingTotal = `${session.shippingMessage} :<strong id="shipping-amount">${result.currencySymbol}${shippingTotalAmt}</strong>`;
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

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">
{{#ifCond @root.session.totalCartShipping '>' 0}}
<div class="text-right">
{{ @root.__ "Shipping" }}
<strong id="shipping-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong>
{{@root.session.shippingMessage}}: <strong id="shipping-amount">{{currencySymbol @root.config.currencySymbol}}{{formatAmount @root.session.totalCartShipping}}</strong>
</div>
{{else}}
<div class="text-right">
{{ @root.__ "Shipping" }}
<strong id="shipping-amount">FREE</strong>
<span id="shipping-amount">{{@root.session.shippingMessage}}</span>
</div>
{{/ifCond}}
<div class="text-right">

View File

@ -17,7 +17,7 @@
{{#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>
{{else}}
<li class="list-group-item">FREE shipping <span class="float-right"></li>
<li class="list-group-item">{{@root.session.shippingMessage}}</li>
{{/ifCond}}
</ul>
{{/unless}}