Skip to content

Commit

Permalink
STENCIL-3536 bulk discout rates (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcampa authored Aug 4, 2017
1 parent 0ffda1d commit 670f310
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
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>

0 comments on commit 670f310

Please sign in to comment.