diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-01-20 04:03:39 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-01-20 04:03:39 +0100 |
| commit | 4c8d3ed138f144643e8c9058dd55728d45eb5db8 (patch) | |
| tree | 421f6827dcca9332d25fc91263e9d62885f03017 /StoneIsland/platforms/ios/www/js/sdk/product.js | |
| parent | 1b574b3294d3d5db37a3d1e180f5dbdd8ba78796 (diff) | |
fix date field graphic bug
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/sdk/product.js')
| -rwxr-xr-x | StoneIsland/platforms/ios/www/js/sdk/product.js | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/StoneIsland/platforms/ios/www/js/sdk/product.js b/StoneIsland/platforms/ios/www/js/sdk/product.js index 7c12e7d7..671d1fea 100755 --- a/StoneIsland/platforms/ios/www/js/sdk/product.js +++ b/StoneIsland/platforms/ios/www/js/sdk/product.js @@ -2,20 +2,41 @@ sdk.product = (function(){ var product = {} var default_gallery = 31617 + var default_department = "NkXStnsl" product.all = function(opt){ return $.ajax({ method: "GET", - url: sdk.path("Search.API/1.2", "search.json"), + url: sdk.path("Search.API/1.3", "search.json"), data: { format: "full", productsPerPage: 100 }, success: opt.success, error: opt.error, }) } - + product.collection = function(opt){ return $.ajax({ method: "GET", + url: sdk.path("Search.API/1.3", "search.json"), + data: { format: "full", department: opt.department_id || default_department, productsPerPage: 100 }, + success: opt.success, + error: opt.error, + }) + } + + product.department_codes = function(opt){ + return $.ajax({ + method: "GET", + url: sdk.path("Search.API/1.3", "search/results.json"), + data: { format: "full", department: opt.department_id || default_department, page: 1 }, + success: opt.success, + error: opt.error, + }) + } + + product.collection_by_gallery = function(opt){ + return $.ajax({ + method: "GET", url: sdk.path("Search.API/1.2", "search.json"), data: { format: "full", gallery: opt.gallery_id || default_gallery, productsPerPage: 100 }, success: opt.success, |
