Skip to content

Commit

Permalink
Moved custom_fields loop in its own component (#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
giacmir authored Jun 22, 2022
1 parent 80ee3cf commit 95b3102
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Incorrect translation displaying in Home Page Carousel for da, sv and no. [#2224]https://github.com/bigcommerce/cornerstone/pull/2224
- Blog Pages Do Not Include Link Rel Next/Prev Tags. [#2214](https://github.com/bigcommerce/cornerstone/issues/2214).
- Add lang attribute to html tag to improve checkout accesibility [#2210]https://github.com/bigcommerce/cornerstone/pull/2210
- Moved custom_fields loop to a dedicated component [#2222](https://github.com/bigcommerce/cornerstone/pull/2222)
- "None" modifier option is displayed as selected even if there is default modifier option [#2227]https://github.com/bigcommerce/cornerstone/pull/2227
- Add pickups to storefront invoice [#2216](https://github.com/bigcommerce/cornerstone/pull/2216)

Expand Down
5 changes: 1 addition & 4 deletions templates/components/amp/products/product-view-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ <h2 class="modal-header-title">{{lang 'products.bulk_pricing.modal_title'}}</h2>
</div>
{{/if}}

{{#each product.custom_fields}}
<dt class="productView-info-name">{{name}}:</dt>
<dd class="productView-info-value">{{{value}}}</dd>
{{/each}}
{{> components/products/custom-fields }}
</dl>
</div>
</section>
4 changes: 4 additions & 0 deletions templates/components/products/custom-fields.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{#each product.custom_fields}}
<dt class="productView-info-name">{{name}}:</dt>
<dd class="productView-info-value">{{{value}}}</dd>
{{/each}}
5 changes: 1 addition & 4 deletions templates/components/products/description-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
{{#all product.custom_fields theme_settings.show_custom_fields_tabs}}
<div class="tab-content" id="tab-{{dashcase (lowercase (sanitize theme_settings.pdp-custom-fields-tab-label))}}">
<dl class="productView-info">
{{#each product.custom_fields}}
<dt class="productView-info-name">{{name}}:</dt>
<dd class="productView-info-value">{{{value}}}</dd>
{{/each}}
{{> components/products/custom-fields }}
</dl>
</div>
{{/all}}
Expand Down
5 changes: 1 addition & 4 deletions templates/components/products/product-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ <h2 class="productView-brand">
{{/if}}

{{#if theme_settings.show_custom_fields_tabs '!==' true}}
{{#each product.custom_fields}}
<dt class="productView-info-name">{{name}}:</dt>
<dd class="productView-info-value">{{{ sanitize value}}}</dd>
{{/each}}
{{> components/products/custom-fields }}
{{/if}}
</dl>
</div>
Expand Down

0 comments on commit 95b3102

Please sign in to comment.