summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/account/AccountView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/account/AccountView.js')
-rw-r--r--StoneIsland/www/js/lib/account/AccountView.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js
index c6f68e88..e9022d64 100644
--- a/StoneIsland/www/js/lib/account/AccountView.js
+++ b/StoneIsland/www/js/lib/account/AccountView.js
@@ -47,8 +47,16 @@ var AccountView = View.extend({
else {
cb && cb()
}
- if (auth.deferred_product) {
- auth.add_deferred_product_to_cart()
+ if ( ! auth.has_cart() ) {
+ auth.create_cart(auth.add_deferred_product_to_cart)
+ }
+ else {
+ if (auth.deferred_product) {
+ auth.add_deferred_product_to_cart( app.cart.load.bind(app.cart) )
+ }
+ else {
+ app.cart.load()
+ }
}
},