summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/auth.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/sdk/auth.js')
-rw-r--r--StoneIsland/www/js/sdk/auth.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/StoneIsland/www/js/sdk/auth.js b/StoneIsland/www/js/sdk/auth.js
index 5efea20e..294a862c 100644
--- a/StoneIsland/www/js/sdk/auth.js
+++ b/StoneIsland/www/js/sdk/auth.js
@@ -63,7 +63,17 @@ var auth = sdk.auth = (function(){
localStorage.removeItem("yoox.cart_id")
cb && cb()
}
-
+ auth.create_cart = function(cb){
+ cart.initialize().done(function(){
+ cart.set_user().done(function(){
+ auth.set_cart(sdk.cart.id, sdk.cart.token, function(){
+ cb && cb()
+ })
+ })
+ })
+ }
+ auth.defer_add_to_cart = function(){
+ }
auth.log_out = function(){
auth.access_token = ""
auth.user_id = -1