From e87604d89ea9baedb297c037c625f155a1930391 Mon Sep 17 00:00:00 2001 From: Matthew Coy Date: Fri, 25 Jan 2019 15:26:00 -0800 Subject: [PATCH 1/2] Resolve settings scope passed to components In various component includes, the store settings is incorrectly scoped. These changes correct the scope. --- templates/components/products/new.html | 4 ++-- templates/components/products/product-view.html | 2 +- templates/components/products/quick-view.html | 2 +- templates/components/products/tabs.html | 2 +- templates/pages/amp/category.html | 2 +- templates/pages/amp/product.html | 4 ++-- templates/pages/brand.html | 2 +- templates/pages/category.html | 2 +- templates/pages/product.html | 2 +- templates/pages/search.html | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/components/products/new.html b/templates/components/products/new.html index bbb2920ef0..19cb5a535a 100644 --- a/templates/components/products/new.html +++ b/templates/components/products/new.html @@ -1,6 +1,6 @@

{{lang 'products.new' }}

{{#if settings.data_tag_enabled}} - {{> components/products/carousel settings=../settings products=products list="New Products"}} + {{> components/products/carousel products=products list="New Products"}} {{else}} {{> components/products/carousel products=products}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/templates/components/products/product-view.html b/templates/components/products/product-view.html index 9695dc7625..3bc34b7fe7 100644 --- a/templates/components/products/product-view.html +++ b/templates/components/products/product-view.html @@ -235,7 +235,7 @@

components/products/description-tabs}} {{else}} - {{> components/products/description settings=../settings}} + {{> components/products/description}} {{/if}} diff --git a/templates/components/products/quick-view.html b/templates/components/products/quick-view.html index 5eab0ddb70..cc2709e5d8 100644 --- a/templates/components/products/quick-view.html +++ b/templates/components/products/quick-view.html @@ -1,3 +1,3 @@ diff --git a/templates/components/products/tabs.html b/templates/components/products/tabs.html index 4fb3f532f0..cb98843bb1 100644 --- a/templates/components/products/tabs.html +++ b/templates/components/products/tabs.html @@ -24,7 +24,7 @@ {{#if product.similar_by_views}}
- {{> components/products/carousel settings=../settings products=product.similar_by_views columns=6 list="Customers Also Viewed"}} + {{> components/products/carousel products=product.similar_by_views columns=6 list="Customers Also Viewed"}}
{{/if}} diff --git a/templates/pages/amp/category.html b/templates/pages/amp/category.html index 21f27456d7..3e2889a4da 100644 --- a/templates/pages/amp/category.html +++ b/templates/pages/amp/category.html @@ -41,7 +41,7 @@

{{/if}} {{> components/amp/category/subcategories}} - {{> components/amp/common/footer settings=../settings}} + {{> components/amp/common/footer}} {{#if settings.amp_analytics_id}} {{/if}} - {{> components/amp/common/footer settings=../settings}} + {{> components/amp/common/footer}} {{/partial}} {{> layout/amp }} diff --git a/templates/pages/brand.html b/templates/pages/brand.html index e091d21c97..6355e0e86c 100644 --- a/templates/pages/brand.html +++ b/templates/pages/brand.html @@ -29,7 +29,7 @@

{{brand.name}}

{{#if brand.products}} - {{> components/brand/product-listing settings=../settings}} + {{> components/brand/product-listing}} {{else}}

{{lang 'brands.no_products'}}

{{/if}} diff --git a/templates/pages/category.html b/templates/pages/category.html index e56278cfe7..a39e49a5e2 100644 --- a/templates/pages/category.html +++ b/templates/pages/category.html @@ -42,7 +42,7 @@

{{category.name}}

{{#if category.products}} - {{> components/category/product-listing settings=../settings}} + {{> components/category/product-listing}} {{else}}

{{lang 'categories.no_products'}}

{{/if}} diff --git a/templates/pages/product.html b/templates/pages/product.html index 2f7e772436..0eddc803db 100644 --- a/templates/pages/product.html +++ b/templates/pages/product.html @@ -17,7 +17,7 @@ {{/each}}
- {{> components/products/product-view settings=../settings schema=true }} + {{> components/products/product-view schema=true }} {{#if product.videos.list.length}} {{> components/products/videos product.videos}} diff --git a/templates/pages/search.html b/templates/pages/search.html index 787f45e94d..2f592bea15 100644 --- a/templates/pages/search.html +++ b/templates/pages/search.html @@ -142,7 +142,7 @@
{{lang 'forms.search.suggestions.title'}}
{{/if}}
- {{> components/search/product-listing settings=../settings}} + {{> components/search/product-listing}}
From f58e8b100b426b42b41bdce8ac46cd183d9bac0b Mon Sep 17 00:00:00 2001 From: Matthew Coy Date: Thu, 31 Jan 2019 13:30:44 -0800 Subject: [PATCH 2/2] Added Changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fb23ff866..4fd5192d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - Ensure SKU and UPC display correctly for Variants on PDP. [#1431](https://github.com/bigcommerce/cornerstone/pull/1431) +- Resolve settings scope passed to components. [#1435](https://github.com/bigcommerce/cornerstone/pull/1435) + ## 3.1.1 (2019-01-23) - Downgrade Webpack to last known good version during development. [#1428](https://github.com/bigcommerce/cornerstone/pull/1428)