diff options
Diffstat (limited to 'StoneIsland/www/js/lib/products/ProductView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index c1847496..de29bf73 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -5,6 +5,7 @@ var ProductView = ScrollableView.extend({ events: { "click .fit": "scroll_to_bottom", + "click .notAvailableInCanada": "scroll_to_bottom", "click .size": "select_size", "click .color": "select_color", "click .share": "share", @@ -25,6 +26,7 @@ var ProductView = ScrollableView.extend({ this.$color = this.$(".color") this.$body = this.$(".body") this.$fit = this.$(".fit") + this.$notAvailableInCanada = this.$(".notAvailableInCanada") this.$sizing = this.$(".sizing") this.$style = this.$(".style") }, @@ -42,6 +44,9 @@ var ProductView = ScrollableView.extend({ if (this.not_available) { app.footer.show("SOLD OUT") } + else if (this.isNotAvailableInCanada) { + app.footer.show("NOT AVAILABLE") + } else { app.footer.show("ADD TO CART", "BUY NOW") } @@ -177,6 +182,15 @@ var ProductView = ScrollableView.extend({ app.product.$fit.toggle( fits_large ) app.product.$sizing.toggle( fits_large ) + var notAvailableInCanada = !! app.store.notAvailableInCanada + app.product.$notAvailableInCanada.toggle( notAvailableInCanada ) + if (notAvailableInCanada && sim.data.countryCode === 'ca') { + this.isNotAvailableInCanada = true + } + else { + this.isNotAvailableInCanada = false + } + this.showFooter() this.deferScrollToTop() |
