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-3536 bulk discount rates #1058

Merged
merged 3 commits into from
Aug 4, 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 @@ -5,6 +5,7 @@
- Product illustrations in the storefront when the product catalog is empty [#1054](https://github.com/bigcommerce/cornerstone/pull/1054)
- Add pointer-event for color and pattern swatches so title tags appear upon hover [#1055](https://github.com/bigcommerce/cornerstone/pull/1055)
- Change the 403 page message to be more friendly [#1057](https://github.com/bigcommerce/cornerstone/pull/1057) & [#1059](https://github.com/bigcommerce/cornerstone/pull/1059)
- Add bulk discount rates to product cards [#1058](https://github.com/bigcommerce/cornerstone/pull/1058)

## 1.9.1 (2017-07-25)
- Move some hard-coded validation messages to language file [#1040](https://github.com/bigcommerce/cornerstone/pull/1040)
Expand Down
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
],
"resources": {
"cart": true,
"bulk_discount_rates": false,
"shop_by_brand": {
"limit": 10
}
Expand Down
33 changes: 33 additions & 0 deletions templates/components/products/bulk-discount-rates.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{#if bulk_discount_rates.length}}
<dt class="productView-info-name">{{lang 'products.bulk_pricing.title'}}</dt>
<dd class="productView-info-value">
<a href="{{url}}" data-reveal-id="bulkPricingModal-{{id}}-{{$index}}">
{{lang 'products.bulk_pricing.view'}}
</a>
</dd>
<div id="bulkPricingModal-{{id}}-{{$index}}" class="modal modal--small" data-reveal>
<div class="modal-header">
<h2 class="modal-header-title">{{lang 'products.bulk_pricing.modal_title'}}</h2>
<a href="#" class="modal-close" aria-label="Close"><span aria-hidden="true">&#215;</span></a>
</div>
<div class="modal-body">
<p>{{lang 'products.bulk_pricing.instructions'}}</p>
<ul>
{{#each bulk_discount_rates}}
<li>
{{lang 'products.bulk_pricing.range' min=min max=max}}
{{#if type '===' 'percent'}}
{{lang 'products.bulk_pricing.percent' discount=discount.formatted}}
{{/if}}
{{#if type '===' 'fixed'}}
{{lang 'products.bulk_pricing.fixed' discount=discount.formatted}}
{{/if}}
{{#if type '===' 'price'}}
{{lang 'products.bulk_pricing.price' discount=discount.formatted}}
{{/if}}
</li>
{{/each}}
</ul>
</div>
</div>
{{/if}}
1 change: 1 addition & 0 deletions templates/components/products/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ <h4 class="card-title">
{{> components/common/login-for-pricing}}
{{/or}}
</div>
{{> components/products/bulk-discount-rates}}
</div>
</article>