Skip to content

Commit 189405c

Browse files
committed
STENCIL-3536 bulk discout rates
1 parent 622da81 commit 189405c

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
],
276276
"resources": {
277277
"cart": true,
278-
"bulk_discount_rates": false,
278+
"bulk_discount_rates": true,
279279
"shop_by_brand": {
280280
"limit": 10
281281
}

templates/components/products/card.html

+35
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,40 @@ <h4 class="card-title">
8282
{{> components/common/login-for-pricing}}
8383
{{/or}}
8484
</div>
85+
{{#if bulk_discount_rates.length}}
86+
<dt class="productView-info-name">{{lang 'products.bulk_pricing.title'}}</dt>
87+
<dd class="productView-info-value">
88+
<a href="{{url}}"
89+
{{#unless is_ajax }}data-reveal-id="bulkPricingModal" {{/unless}}>
90+
{{lang 'products.bulk_pricing.view'}}
91+
</a>
92+
</dd>
93+
94+
<div id="bulkPricingModal" class="modal modal--small" data-reveal>
95+
<div class="modal-header">
96+
<h2 class="modal-header-title">{{lang 'products.bulk_pricing.modal_title'}}</h2>
97+
<a href="#" class="modal-close" aria-label="Close"><span aria-hidden="true">&#215;</span></a>
98+
</div>
99+
<div class="modal-body">
100+
<p>{{lang 'products.bulk_pricing.instructions'}}</p>
101+
<ul>
102+
{{#each bulk_discount_rates}}
103+
<li>
104+
{{lang 'products.bulk_pricing.range' min=min max=max}}
105+
{{#if type '===' 'percent'}}
106+
{{lang 'products.bulk_pricing.percent' discount=discount.formatted}}
107+
{{/if}}
108+
{{#if type '===' 'fixed'}}
109+
{{lang 'products.bulk_pricing.fixed' discount=discount.formatted}}
110+
{{/if}}
111+
{{#if type '===' 'price'}}
112+
{{lang 'products.bulk_pricing.price' discount=discount.formatted}}
113+
{{/if}}
114+
</li>
115+
{{/each}}
116+
</ul>
117+
</div>
118+
</div>
119+
{{/if}}
85120
</div>
86121
</article>

0 commit comments

Comments
 (0)