diff --git a/CHANGELOG.md b/CHANGELOG.md index a28a1435bb..fdaf1f392a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Draft +- Remove Compare Form. [#2162](https://github.com/bigcommerce/cornerstone/pull/2162) - Fixed password complexity error not displaying the complexity rules set in the store settings [#2117](https://github.com/bigcommerce/cornerstone/pull/2117) - Translation updates February 2022. [#2177](https://github.com/bigcommerce/cornerstone/pull/2177) - Cornerstone performance optimizations: blocking scripts delaying DomContentLoaded. [#2158](https://github.com/bigcommerce/cornerstone/pull/2158) diff --git a/assets/js/theme/global/compare-products.js b/assets/js/theme/global/compare-products.js index 2c47789e64..eb9b52fc3e 100644 --- a/assets/js/theme/global/compare-products.js +++ b/assets/js/theme/global/compare-products.js @@ -51,16 +51,6 @@ export default function ({ noCompareMessage, urls }) { updateCounterNav(compareCounter, $clickedCompareLink, urls); }); - $('body').on('submit', '[data-product-compare]', event => { - const $this = $(event.currentTarget); - const productsToCompare = $this.find('input[name="products\[\]"]:checked'); - - if (productsToCompare.length <= 1) { - showAlertModal(noCompareMessage); - event.preventDefault(); - } - }); - $('body').on('click', 'a[data-compare-nav]', () => { const $clickedCheckedInput = $('body').find('input[name="products\[\]"]:checked'); diff --git a/templates/components/brand/product-listing.html b/templates/components/brand/product-listing.html index ea09261c2d..d675b587ea 100644 --- a/templates/components/brand/product-listing.html +++ b/templates/components/brand/product-listing.html @@ -2,12 +2,12 @@ {{> components/products/filter sort=pagination.brand.sort}} -
+
{{#if theme_settings.product_list_display_mode '===' 'grid'}} {{> components/products/grid products=brand.products show_compare=brand.show_compare theme_settings=theme_settings event="list"}} {{else}} {{> components/products/list products=brand.products show_compare=brand.show_compare theme_settings=theme_settings event="list"}} {{/if}} - +
{{> components/common/paginator pagination.brand}} diff --git a/templates/components/category/product-listing.html b/templates/components/category/product-listing.html index 51d639fe2c..6de3d4982e 100644 --- a/templates/components/category/product-listing.html +++ b/templates/components/category/product-listing.html @@ -3,7 +3,7 @@ {{#if category.products}} {{> components/products/filter sort=pagination.category.sort}} -
+
{{#if theme_settings.product_list_display_mode '===' 'grid'}} {{#if settings.data_tag_enabled}} {{> components/products/grid products=category.products show_compare=category.show_compare theme_settings=theme_settings event="list" }} @@ -17,7 +17,7 @@ {{> components/products/list products=category.products show_compare=category.show_compare theme_settings=theme_settings}} {{/if}} {{/if}} - +
{{> components/common/paginator pagination.category}} {{else}} diff --git a/templates/components/search/product-listing.html b/templates/components/search/product-listing.html index 96d7d2d045..bb9f7a668b 100644 --- a/templates/components/search/product-listing.html +++ b/templates/components/search/product-listing.html @@ -3,7 +3,7 @@ {{#if product_results.products.length}} {{> components/products/filter sort=pagination.product_results.sort}} {{/if}} -
+
{{#if theme_settings.product_list_display_mode '===' 'grid'}} {{#if settings.data_tag_enabled}} {{> components/products/grid products=product_results.products show_compare=product_results.show_compare event="list" theme_settings=theme_settings}} @@ -17,6 +17,6 @@ {{> components/products/list products=product_results.products show_compare=product_results.show_compare theme_settings=theme_settings}} {{/if}} {{/if}} - +
{{> components/common/paginator pagination.product_results}} diff --git a/templates/pages/account/recent-items.html b/templates/pages/account/recent-items.html index d24e9896b7..d2cd37faf4 100644 --- a/templates/pages/account/recent-items.html +++ b/templates/pages/account/recent-items.html @@ -8,9 +8,9 @@

{{lang 'account.recent_items.heading' }}

{{> components/common/alert/alert-info (lang 'account.recent_items.no_items')}} {{/unless}} -
+
{{> components/products/grid products=customer.recently_viewed_products.items show_compare=customer.recently_viewed_products.show_compare}} - +
{{/partial}} {{> layout/base}}