Skip to content

Commit

Permalink
STENCIL-3536 bulk discout rates
Browse files Browse the repository at this point in the history
  • Loading branch information
mcampa committed Aug 1, 2017
1 parent 622da81 commit 189405c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
],
"resources": {
"cart": true,
"bulk_discount_rates": false,
"bulk_discount_rates": true,
"shop_by_brand": {
"limit": 10
}
Expand Down
35 changes: 35 additions & 0 deletions templates/components/products/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,40 @@ <h4 class="card-title">
{{> components/common/login-for-pricing}}
{{/or}}
</div>
{{#if bulk_discount_rates.length}}
<dt class="productView-info-name">{{lang 'products.bulk_pricing.title'}}</dt>
<dd class="productView-info-value">
<a href="{{url}}"
{{#unless is_ajax }}data-reveal-id="bulkPricingModal" {{/unless}}>
{{lang 'products.bulk_pricing.view'}}
</a>
</dd>

<div id="bulkPricingModal" 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}}
</div>
</article>

0 comments on commit 189405c

Please sign in to comment.