summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
index 72c44405..ff1e001f 100644
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
@@ -39,6 +39,7 @@ var CartSummary = ScrollableView.extend({
load: function(){
this.el.className = "loading"
app.footer.show("SHIPPING >", "CANCEL")
+ app.curtain.show("loading")
sdk.cart.get_status({
success: this.populate.bind(this),
error: this.empty.bind(this),
@@ -54,6 +55,7 @@ var CartSummary = ScrollableView.extend({
return this.empty()
}
+ this.parent.$steps.show()
this.updateCounts()
this.$rows.empty()
@@ -119,10 +121,15 @@ var CartSummary = ScrollableView.extend({
}.bind(this))
}.bind(this))
+ if (data.Cart.Receiver && data.Cart.Receiver.City) {
+ app.cart.shipping.load_form( data )
+ }
+
this.updateTotals()
this.el.className = "full"
this.refreshScroller()
+ app.curtain.hide("loading")
},
updateCounts: function(){
@@ -133,7 +140,7 @@ var CartSummary = ScrollableView.extend({
updateTotals: function(){
var subtotal = this.data.Cart.Totals.TotalWithoutPromotions
var shipping_cost = this.data.Cart.DeliveryMethod.Selected.Amount.Total
- var tax = 0
+ var tax = this.data.Cart.Totals.TotalSalesTax
var total = this.data.Cart.Totals.TotalToPay
this.$subtotal.html( as_cash(subtotal) )
@@ -148,6 +155,7 @@ var CartSummary = ScrollableView.extend({
this.parent.setHeaderCount( 0 )
this.parent.$itemcount.html("0 ITEMS")
this.el.className = "empty"
+ this.parent.$steps.hide()
},
save: function(){