From 798fc4efb2da2ba0bc730bbb409993239edc0c63 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 5 Nov 2015 15:24:37 -0500 Subject: extracting product descriptions --- StoneIsland/www/js/lib/products/ProductView.js | 37 +++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'StoneIsland') diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 0e4063df..c1085b91 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -69,7 +69,13 @@ var ProductView = ScrollableView.extend({ populate: function(data, details){ this.show() -console.log(data, details) +// console.log(data, details) + + var descriptions = {} + details['Item']['Descriptions'].forEach(function(pair){ + descriptions[pair.Key] = pair.Value + }) + var name_partz = data['ModelNames'].split(' ') var num = name_partz.shift() var title = name_partz.join(' ') @@ -77,10 +83,9 @@ console.log(data, details) var price = "$" + data['DiscountedPrice'] + ".00" var size = data['Sizes'][0] var size_label = SIZE_LOOKUP[size] - var color = data['Colors'][0] - console.log(color) + var color = data['Colors'].length && data['Colors'][0] var color_label = color && color['Text'] - var body = "" + var body = descriptions['EditorialDescription'] this.item = data this.color = color @@ -223,4 +228,28 @@ console.log(data, details) "MicroCategoryId": 1319 }, +DESCRIPTIONS: + +Age: "Adult" +Appliqué: "Logo detail" +ColoreFoto_ID: "3140" +Composition: "100% Cotton" +CustomsInvoiceDescr: "Woven" +Design: "Solid color" +EditorialDescription: "20081 DATA DRIP PIN
Short sleeve T-Shirt in cotton jersey. Garment dyed.
Stone Island Compass logo print on the front, made up of a series of numbers." +ItemDescription: "Logo detail
Jersey
Round collar
Solid color
" +KeywordDescription: "Logo detail Jersey Round collar Solid color Jersey Woven not made of fur " +Kind of fabric: "Woven" +MFC: "631520081CC-6315-81V0060" +MacroCategory: "POLO SHIRTS & T-SHIRTS" +MadeIn: "Made In Turkmenistan" +MadeInIsoCode: "TN" +MainMaterial: "Cotton" +Material Description: "Jersey" +MicroCategory: "Short sleeve t-shirt" +MicroCategoryPlural: "Short sleeve t-shirts" +ModelFabric: "631520081CC-6315-81" +ModelNames: "20081 DATA DRIP PIN" +Neckline: "Claudine or round collar" + */ \ No newline at end of file -- cgit v1.2.3-70-g09d2