diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-03-23 17:09:48 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-03-23 17:09:48 +0100 |
| commit | 3696f587f46a6d596bc8c0e9891566edbaf0ca63 (patch) | |
| tree | 41f2db8966f2ff10cd467d1e66ce2c0ba5de52af /StoneIsland/www/js/lib/products/ProductView.js | |
| parent | c23ff34eeef700532e22f6d3f573e54dfd48b5a9 (diff) | |
android
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 81ad536d..4ae77c1f 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -118,7 +118,9 @@ var ProductView = ScrollableView.extend({ var title = name_partz.join(' ') var type = title_case( data['MicroCategory'] ) var price = "$" + data['DiscountedPrice'] + ".00" - var body = descriptions['Details'] + " " + descriptions['EditorialDescription'] + var details = descriptions['Details'] || "" + var editorial = descriptions['EditorialDescription'] || "" + var body = details + " " + editorial // body = body.replace(/<br>/g, "<br><br>").replace(/(<br>)+$/, "") var default_color_id = this.populate_selectors(data, details) @@ -218,10 +220,21 @@ var ProductView = ScrollableView.extend({ }) details['Item']['ModelSizes'].forEach(function(size){ - var label = SIZE_LOOKUP[ size['Default']['Text'] ] - if (! label && ! size['Default']['Labeled']) { + var label = "" + if (details['Item']['SizeTypeId'] == 412) { // shoes label = size['Default']['Text'] + " " + size['Default']['ClassFamily'] + console.log("shoes?", label) } + else { // everything else + label = SIZE_LOOKUP[ size['Default']['Text'] ] + } + if (! label) { + label = size['Default']['Text'] + if (size['Default']['Labeled']) { + label += " " + size['Default']['ClassFamily'] + } + } + console.log(size) size_lookup[ label ] = size['SizeId'] console.log( label ) sizes[ size['SizeId'] ] = { |
