summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-02 21:00:30 -0500
committerJules Laplace <jules@okfoc.us>2015-12-02 21:00:30 -0500
commit393dc6eaf8d5a119c9cf71f1f5dac44abf70db59 (patch)
tree84d2856b9b7c97731970347a9357722f63679b4e /StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
parentd6910087feae6cd30141a615f2de753c37af14b8 (diff)
build..
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 &gt;", "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(){