summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/cart
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/cart')
-rw-r--r--StoneIsland/www/js/lib/cart/CartConfirm.js8
-rw-r--r--StoneIsland/www/js/lib/cart/CartError.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartPayment.js3
-rw-r--r--StoneIsland/www/js/lib/cart/CartSummary.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartView.js1
5 files changed, 10 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index 27e249cf..f6c7f1f5 100644
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -147,7 +147,7 @@ var CartConfirm = FormView.extend({
case 440: // genericapierror (credit card error!)
case 441: // genericapierror (credit card empty)
app.router.go('cart/payment')
- app.cart.payment.show_errors(["Number","There was a problem with your credit card."])
+ app.cart.payment.show_errors([["Number","There was a problem with your credit card."]])
break
}
}.bind(this))
@@ -156,14 +156,14 @@ var CartConfirm = FormView.extend({
finalization_error: function(data){
if (data['Error']['Description'].match(/receiver validation fails/)) {
app.router.go('cart/shipping')
- app.cart.payment.show_errors(["Number","There was a problem with your credit card."])
+ app.cart.payment.show_errors([["Number","There was a problem with your credit card."]])
}
else if (data['Error']['Description'].match(/cart cannot be empty/)) {
app.router.go('cart/summary')
}
else if (data['Error']['Description'].match(/Item has been removed/)) {
- app.router.go('cart/thanks')
- app.cart.thanks.show_error("We're sorry, but one or more items was out of stock. Please check your cart and try again.")
+ app.router.go('cart/error')
+ app.cart.error.show_error("We're sorry, but one or more items was out of stock. Please check your cart and try again.")
}
},
diff --git a/StoneIsland/www/js/lib/cart/CartError.js b/StoneIsland/www/js/lib/cart/CartError.js
index f2edae35..f9a1963e 100644
--- a/StoneIsland/www/js/lib/cart/CartError.js
+++ b/StoneIsland/www/js/lib/cart/CartError.js
@@ -12,7 +12,7 @@ var CartError = View.extend({
show: function(){
document.body.className = "cart"
- app.cart.el.className = "cart_error"
+ app.cart.el.className = "error"
app.footer.show("< BACK TO CART")
app.footer.hide()
},
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index 8a803de3..f3c54d55 100644
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -138,6 +138,7 @@ var CartPayment = FormView.extend({
this.success()
}.bind(this)).error(function(data){
app.curtain.hide("loading")
+ console.log(data)
}.bind(this))
return
@@ -173,7 +174,7 @@ var CartPayment = FormView.extend({
error: function(data){
console.log(data)
- app.cart.payment.show_errors(["Number","There was a problem with your credit card."])
+ app.cart.payment.show_errors([["Number","There was a problem with your credit card."]])
},
cancel: function(){
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index f370dc73..ff1e001f 100644
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -55,6 +55,7 @@ var CartSummary = ScrollableView.extend({
return this.empty()
}
+ this.parent.$steps.show()
this.updateCounts()
this.$rows.empty()
@@ -154,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(){
diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js
index 032b2fed..1b08e418 100644
--- a/StoneIsland/www/js/lib/cart/CartView.js
+++ b/StoneIsland/www/js/lib/cart/CartView.js
@@ -16,6 +16,7 @@ var CartView = View.extend({
this.thanks = new CartThanks ({ parent: this })
this.error = new CartError ({ parent: this })
+ this.$steps = this.$(".steps")
this.$full_msg = this.$(".full_msg")
this.$empty_msg = this.$(".empty_msg")
this.$itemcount = this.$(".itemcount")