Skip to content

Commit

Permalink
fix(storefront): BCTHEME-347 Add unique identifiers to product cards (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-alexsaiannyi committed Mar 2, 2021
1 parent 85af5e4 commit b8717da
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Added unique identifiers to product cards on product list pages. [#1999](https://github.com/bigcommerce/cornerstone/pull/1999)
- Fixed line breaks on Dropdown menu display mode. [#1996](https://github.com/bigcommerce/cornerstone/pull/1996)
- Added notifications on Carousel's content cahnge through 'Next/Prev' buttons. [#1986](https://github.com/bigcommerce/cornerstone/pull/1986)

Expand Down
26 changes: 25 additions & 1 deletion templates/components/products/card.html
@@ -1,4 +1,28 @@
<article class="card {{#if alternate}}card--alternate{{/if}}" {{#if settings.data_tag_enabled}} data-event-type="{{event}}" data-entity-id="{{id}}" data-position="{{position}}" data-name="{{name}}" data-product-category="{{#each category}}{{#if @last}}{{this}}{{else}}{{this}}, {{/if}}{{/each}}" data-product-brand="{{brand.name}}" data-product-price="{{#if price.with_tax}}{{price.with_tax.value}}{{else}}{{price.without_tax.value}}{{/if}}" {{/if}}>
<article
class="card
{{#if alternate}} card--alternate{{/if}}"
data-test="card-{{id}}"
{{#if settings.data_tag_enabled}}
data-event-type="{{event}}"
data-entity-id="{{id}}"
data-position="{{position}}"
data-name="{{name}}"
data-product-category="
{{#each category}}
{{#if @last}}
{{this}}
{{else}}
{{this}},
{{/if}}
{{/each}}"
data-product-brand="{{brand.name}}"
data-product-price="
{{#if price.with_tax}}
{{price.with_tax.value}}
{{else}}
{{price.without_tax.value}}
{{/if}}"
{{/if}}>
<figure class="card-figure">
{{#or price.sale_price_with_tax.value price.sale_price_without_tax.value}}
{{#if theme_settings.product_sale_badges '===' 'sash'}}
Expand Down

0 comments on commit b8717da

Please sign in to comment.