Commit 187e3e9b by dhn

运费

parent a079ce50
...@@ -93,10 +93,14 @@ define([ ...@@ -93,10 +93,14 @@ define([
price = this.totals()['shipping_amount']; price = this.totals()['shipping_amount'];
if(price == 0) if(price == 0)
{ {
if(quote.shippingSaveMethod()) if(quote.shippingSaveMethod() && quote.shippingSaveMethod()['amount'] != 0)
{ {
return this.getFormattedPrice(quote.shippingSaveMethod()['amount']); return this.getFormattedPrice(quote.shippingSaveMethod()['amount']);
} }
else
{
return this.getFormattedPrice(window.checkoutConfig.flatrate_price);
}
} }
return this.getFormattedPrice(price); return this.getFormattedPrice(price);
}, },
...@@ -109,12 +113,16 @@ define([ ...@@ -109,12 +113,16 @@ define([
price = this.totals()['shipping_amount']; price = this.totals()['shipping_amount'];
if(price == 0) if(price == 0)
{ {
if(quote.shippingSaveMethod()) if(quote.shippingSaveMethod() && quote.shippingSaveMethod()['amount'] != 0)
{ {
return '-'+this.getFormattedPrice(quote.shippingSaveMethod()['amount']); return '-'+this.getFormattedPrice(quote.shippingSaveMethod()['amount']);
} }
return 0; else
{
return '-'+this.getFormattedPrice(window.checkoutConfig.flatrate_price);
}
} }
return 0;
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment