Skip to content

Commit

Permalink
Resolve settings scope passed to components
Browse files Browse the repository at this point in the history
In various component includes, the store settings is incorrectly scoped. These changes correct the scope.
  • Loading branch information
mattcoy-arcticleaf committed Jan 25, 2019
1 parent 6bf8f88 commit e87604d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions templates/components/products/new.html
@@ -1,6 +1,6 @@
<h2 class="page-heading">{{lang 'products.new' }}</h2>
{{#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}}
{{/if}}
2 changes: 1 addition & 1 deletion templates/components/products/product-view.html
Expand Up @@ -235,7 +235,7 @@ <h2 class="productView-brand"{{#if schema}} itemprop="brand" itemscope itemtype=
{{#if theme_settings.show_product_details_tabs}}
{{> components/products/description-tabs}}
{{else}}
{{> components/products/description settings=../settings}}
{{> components/products/description}}
{{/if}}
</article>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/components/products/quick-view.html
@@ -1,3 +1,3 @@
<div class="modal-body quickView">
{{> components/products/product-view settings=../settings schema=false}}
{{> components/products/product-view schema=false}}
</div>
2 changes: 1 addition & 1 deletion templates/components/products/tabs.html
Expand Up @@ -24,7 +24,7 @@

{{#if product.similar_by_views}}
<div role="tabpanel" aria-hidden="{{#if product.related_products}}true{{else}}false{{/if}}" class="tab-content has-jsContent{{#unless product.related_products}} is-active{{/unless}}" id="tab-similar">
{{> 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"}}

</div>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/amp/category.html
Expand Up @@ -41,7 +41,7 @@ <h1 class="categoryView-title">
{{/if}}
</main>
{{> components/amp/category/subcategories}}
{{> components/amp/common/footer settings=../settings}}
{{> components/amp/common/footer}}
{{#if settings.amp_analytics_id}}
<amp-analytics type="googleanalytics">
<script type="application/json">
Expand Down
4 changes: 2 additions & 2 deletions templates/pages/amp/product.html
Expand Up @@ -24,7 +24,7 @@
{{#partial "page"}}
{{> components/amp/common/header }}
<div itemscope itemtype="http://schema.org/Product">
{{> components/amp/products/product-view schema=true settings=../settings}}
{{> components/amp/products/product-view schema=true}}
</div>
{{#if settings.amp_analytics_id}}
<amp-analytics type="googleanalytics">
Expand Down Expand Up @@ -69,6 +69,6 @@
</script>
</amp-analytics>
{{/if}}
{{> components/amp/common/footer settings=../settings}}
{{> components/amp/common/footer}}
{{/partial}}
{{> layout/amp }}
2 changes: 1 addition & 1 deletion templates/pages/brand.html
Expand Up @@ -29,7 +29,7 @@ <h1 class="page-heading">{{brand.name}}</h1>

<main class="page-content" id="product-listing-container">
{{#if brand.products}}
{{> components/brand/product-listing settings=../settings}}
{{> components/brand/product-listing}}
{{else}}
<p>{{lang 'brands.no_products'}}</p>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/category.html
Expand Up @@ -42,7 +42,7 @@ <h1 class="page-heading">{{category.name}}</h1>

<main class="page-content" id="product-listing-container">
{{#if category.products}}
{{> components/category/product-listing settings=../settings}}
{{> components/category/product-listing}}
{{else}}
<p>{{lang 'categories.no_products'}}</p>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/product.html
Expand Up @@ -17,7 +17,7 @@
{{/each}}

<div itemscope itemtype="http://schema.org/Product">
{{> components/products/product-view settings=../settings schema=true }}
{{> components/products/product-view schema=true }}

{{#if product.videos.list.length}}
{{> components/products/videos product.videos}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/search.html
Expand Up @@ -142,7 +142,7 @@ <h5 class="suggestion-title">{{lang 'forms.search.suggestions.title'}}</h5>
{{/if}}

<div id="product-listing-container" {{#if forms.search.section '!=' 'product'}}class="u-hiddenVisually"{{/if}}>
{{> components/search/product-listing settings=../settings}}
{{> components/search/product-listing}}
</div>
</main>
</section>
Expand Down

0 comments on commit e87604d

Please sign in to comment.