Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STENCIL-3974 - PLP Price Ranges #1111

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Use appropriately-sized (50x50) images for product thumbnails on product details page [#1097](https://github.com/bigcommerce/cornerstone/pull/1097)
- Add spacing between checkout buttons [#1105](https://github.com/bigcommerce/cornerstone/pull/1105)
- Load visible images before images below the fold, and save space for lazy loading images prior to loading them [#1104](https://github.com/bigcommerce/cornerstone/pull/1104)
- Shows price ranges instead of prices when they are present in the context on product list pages [#1111](https://github.com/bigcommerce/cornerstone/pull/1111)

## 1.9.4 (2017-10-17)
- Style optimized checkout new checklist radio buttons [#1088](https://github.com/bigcommerce/cornerstone/pull/1088)
Expand Down
6 changes: 5 additions & 1 deletion templates/components/products/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ <h4 class="card-title">

<div class="card-text" data-test-info-type="price">
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
{{> components/products/price price=price customer=customer}}
{{#if price_range}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about product view ? https://github.com/bigcommerce/cornerstone/blob/master/templates/components/products/product-view.html#L19 are we not planning on showing the range in the quick view & product detail page until an option is selected ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, this is only for PLP and nowhere else.

{{> components/products/price-range}}
{{else}}
{{> components/products/price price=price customer=customer}}
{{/if}}
{{else}}
{{> components/common/login-for-pricing}}
{{/or}}
Expand Down
3 changes: 3 additions & 0 deletions templates/components/products/price-range.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{#with price_range}}
{{min.formatted}} - {{max.formatted}}
{{/with}}
6 changes: 5 additions & 1 deletion templates/pages/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ <h4 class="card-title">
<a href="{{url}}">{{ name }}</a>
</h4>
{{#or ../customer (if ../theme_settings.restrict_to_login '!==' true)}}
{{> components/products/price price=price}}
{{#if price_range}}
{{> components/products/price-range}}
{{else}}
{{> components/products/price price=price}}
{{/if}}
{{else}}
{{> components/common/login-for-pricing}}
{{/or}}
Expand Down