Skip to content

Commit

Permalink
feature(bctheme): Update CornerStone to Utilize Existence of sale_pri…
Browse files Browse the repository at this point in the history
…ce property for Determining Product/Variant Sale Status
  • Loading branch information
yurytut1993 committed Jul 10, 2020
1 parent 4947f97 commit 690cc8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/components/amp/products/card.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<article class="card {{#if alternate}}card--alternate{{/if}}">
<figure class="card-figure">
{{#or price.non_sale_price_with_tax price.non_sale_price_without_tax}}
{{#or price.sale_price_with_tax.value price.sale_price_without_tax.value}}
{{#if theme_settings.product_sale_badges}}
<div class="sale-sash">
<span class="sale-text">On Sale!</span>
Expand Down
3 changes: 0 additions & 3 deletions templates/components/products/card.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<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}}>
<div>
{{JSONstringify price }}
</div>
<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
2 changes: 1 addition & 1 deletion templates/components/products/list-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<article class="listItem">
{{/if}}
<figure class="listItem-figure">
{{#or price.non_sale_price_with_tax price.non_sale_price_without_tax}}
{{#or price.sale_price_with_tax.value price.sale_price_without_tax.value}}
{{#if theme_settings.product_sale_badges '===' 'sash'}}
<div class="sale-flag-sash">
<span class="sale-text">On Sale!</span>
Expand Down

0 comments on commit 690cc8c

Please sign in to comment.