From 945b9d2012f69034fec64ec30793aab9213f87c4 Mon Sep 17 00:00:00 2001 From: bookernath Date: Sat, 18 Feb 2017 12:23:47 -0800 Subject: [PATCH] STENCIL-3009 - automatically open review link if hash is included Our product review emails link to the PDP with the hash #write_review included. We need to respond to this hash and automatically pop the review form. --- CHANGELOG.md | 1 + assets/js/theme/product.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a946c40875..b0d0405efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Update text input for product review comment to be multiline so it's not too small to be usable [#921] (https://github.com/bigcommerce/stencil/pull/921) - Add a larger view of a swatch image when option is hovered over on the product page [#923](https://github.com/bigcommerce/stencil/pull/923) - Fixes an issue with file upload button not properly displaying in IE [#925](https://github.com/bigcommerce/stencil/pull/925) +- Make sure product review email links automatically pop the review form [#928](https://github.com/bigcommerce/stencil/pull/928) ## 1.5.2 (2017-02-14) - Added a setting to theme editor schema to show/hide the homepage carousel [#909](https://github.com/bigcommerce/stencil/pull/909) diff --git a/assets/js/theme/product.js b/assets/js/theme/product.js index 08dcd0006f..6a8e7d0b62 100644 --- a/assets/js/theme/product.js +++ b/assets/js/theme/product.js @@ -63,7 +63,7 @@ export default class Product extends PageManager { } productReviewHandler() { - if (this.url.indexOf('#writeReview') !== -1) { + if (this.url.indexOf('#write_review') !== -1) { this.$reviewLink.click(); } }