summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/products/ProductView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-11 19:47:36 -0500
committerJules Laplace <jules@okfoc.us>2015-11-11 19:47:36 -0500
commit79897a642e0dbe3d1d4e11d58e3614da682eae7a (patch)
tree3f6e34f4ec499ae6136a2bd526468fa3dabdef38 /StoneIsland/www/js/lib/products/ProductView.js
parent9dbef9843e2a63c04ed26f7c11d184d8925f2eb5 (diff)
chisel sizes/colors into product view
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
-rw-r--r--StoneIsland/www/js/lib/products/ProductView.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 9b7912aa..19a1f795 100644
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -20,11 +20,10 @@ var ProductView = ScrollableView.extend({
this.$size = this.$(".size")
this.$color = this.$(".color")
this.$body = this.$(".body")
-
- app.footer.show("ADD TO CART", "&lt; BACK TO SHOPPING")
},
show: function(){
+ app.footer.show("ADD TO CART", "&lt; BACK TO SHOPPING")
document.body.className = "product"
},
hide: function(){
@@ -71,6 +70,7 @@ var ProductView = ScrollableView.extend({
populate: function(data, details){
this.el.className = ""
+
console.log(data, details)
var descriptions = {}
@@ -90,8 +90,11 @@ var ProductView = ScrollableView.extend({
var color = this.colors[default_color_id]
var color_label = color.label
- var size = data['Sizes'][0]
- var size_label = SIZE_LOOKUP[size]
+ var sizes = this.find_sizes_for_color(default_color_id)
+ var size = sizes[0]
+ var size_label = this.sizes[size].label
+
+ // console.log(color, color_label, size, size_label)
this.item = data
this.details = details['Item']