diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-21 15:57:50 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-21 15:57:50 -0500 |
| commit | c223032bbd67fe5b6ad1334ce81a3f51a7631bfc (patch) | |
| tree | 9f832d23e348a3b92030ec7da6053d7eece24254 /StoneIsland/www/js/sdk/cart.js | |
| parent | 29380aa560c05186aa67b7b36d4a40c65e570d35 (diff) | |
cart empty warning
Diffstat (limited to 'StoneIsland/www/js/sdk/cart.js')
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index cfa997cb..308231ff 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -90,8 +90,12 @@ sdk.cart = (function(){ "x-yoox-device": auth.device, }, success: function(data){ - // console.log(data) - opt.success(data) + if (data['Error']) { + opt.error && opt.error(data) + } + else { + opt.success(data) + } }, error: opt.error, }) @@ -106,7 +110,10 @@ sdk.cart = (function(){ "x-yoox-appname": auth.appname, "x-yoox-cart-token": cart.token, }, - data: opt.data, + data: { + "UserId": auth.user_id, + "UserToken": auth.access_token, + }, success: function(data){ // console.log(data) opt.success(data) |
