From 555819de8bb037e28c598c369eefca8565358194 Mon Sep 17 00:00:00 2001 From: Tymur Biedukhin Date: Thu, 22 Oct 2020 13:33:21 +0300 Subject: [PATCH] fix(storefront): BCTHEME-288 Shoppers are not anchor-linked to reviews on PDPs if product description tabs are enabled --- CHANGELOG.md | 1 + assets/js/theme/product/reviews.js | 2 +- templates/components/products/product-view.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e12c59e3..a1d28ac910 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Shoppers are not anchor-linked to reviews on PDPs if product description tabs are enabled. [#1883](https://github.com/bigcommerce/cornerstone/pull/1883) - Fixed Product Image Carousel Becomes Responsiveness on Product Page. [#1879](https://github.com/bigcommerce/cornerstone/pull/1879) - Move phrases and static strings to en.json for improving translation customizing. [#1850](https://github.com/bigcommerce/cornerstone/pull/1850) - Update carousel images to improve LCP indicator from Lighthouse performance report. [#1876](https://github.com/bigcommerce/cornerstone/pull/1876) diff --git a/assets/js/theme/product/reviews.js b/assets/js/theme/product/reviews.js index 3b52786718..22bb8ebc79 100644 --- a/assets/js/theme/product/reviews.js +++ b/assets/js/theme/product/reviews.js @@ -23,7 +23,7 @@ export default class { initLinkBind() { const $content = $('#productReviews-content', this.$reviewsContent); - $('.productView-reviewLink').on('click', () => { + $('#productReview_link').on('click', () => { $('.productView-reviewTabLink').trigger('click'); if (!$content.hasClass('is-open')) { this.$collapsible.trigger(CollapsibleEvents.click); diff --git a/templates/components/products/product-view.html b/templates/components/products/product-view.html index 33778da258..2aa4a08aa2 100644 --- a/templates/components/products/product-view.html +++ b/templates/components/products/product-view.html @@ -103,7 +103,7 @@

components/products/ratings rating=product.rating}} {{#if product.num_reviews '>' 0}} - + {{lang 'products.reviews.link_to_review' total=product.num_reviews}} {{else}}