From f93e4d7ff58927c32e634fff32b4a615ac55463a Mon Sep 17 00:00:00 2001 From: BC-tymurbiedukhin <66319629+BC-tymurbiedukhin@users.noreply.github.com> Date: Wed, 21 Oct 2020 14:15:01 +0300 Subject: [PATCH] fix(storefront): BCTHEME-233 Cornerstone - Unable to Compare Products from Recently Viewed Items (#1877) --- CHANGELOG.md | 1 + assets/js/theme/account.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 961fe1a646..062875f357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Fixed comparing Products on 'Account - Recently Viewed' page. [#1877](https://github.com/bigcommerce/cornerstone/pull/1877) - Remove layout shifts to improve CLS indicator from Lighthouse performance report. [#1869](https://github.com/bigcommerce/cornerstone/pull/1869) - Fix aria-labels for collapsibleFactory elements. [#1868](https://github.com/bigcommerce/cornerstone/pull/1868) - Fixed social icons click behaviour after quick view modal reopening. [#1874](https://github.com/bigcommerce/cornerstone/pull/1874) diff --git a/assets/js/theme/account.js b/assets/js/theme/account.js index 1486d4b0f8..2c46884b1f 100644 --- a/assets/js/theme/account.js +++ b/assets/js/theme/account.js @@ -7,6 +7,7 @@ import stateCountry from './common/state-country'; import { classifyForm, Validators, insertStateHiddenField } from './common/utils/form-utils'; import { creditCardType, storeInstrument, Validators as CCValidators, Formatters as CCFormatters } from './common/payment-method'; import swal from './global/sweet-alert'; +import compareProducts from './global/compare-products'; export default class Account extends PageManager { constructor(context) { @@ -25,6 +26,8 @@ export default class Account extends PageManager { const $reorderForm = classifyForm('[data-account-reorder-form]'); const $invoiceButton = $('[data-print-invoice]'); + compareProducts(this.context.urls); + // Injected via template this.passwordRequirements = this.context.passwordRequirements;