From b6e1b4ad311f42228f349c5a948a41d3d65b0a10 Mon Sep 17 00:00:00 2001 From: Tymur Biedukhin Date: Tue, 20 Oct 2020 13:22:59 +0300 Subject: [PATCH] fix(storefront): BCTHEME-233 Cornerstone - Unable to Compare Products from Recently Viewed Items --- CHANGELOG.md | 1 + assets/js/theme/account.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f1f0a514f..25733e37a6 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) - Unified browsers list that we support. [#1836](https://github.com/bigcommerce/cornerstone/pull/1836) - Bump stencil utils and update hooks to account for refactor to drop Jquery in stencil utils [#1821](https://github.com/bigcommerce/cornerstone/pull/1821) 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;