Skip to content

Commit f34af7e

Browse files
Merge pull request #2592 from bigcommerce/BACK-469
feat(backorders): BACK-469 add backorder availability prompt on PDP
2 parents 4a26c5e + ea61dc8 commit f34af7e

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

assets/scss/components/stencil/productView/_productView.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@
216216
}
217217
}
218218

219+
// Details - Product backorder message
220+
// -----------------------------------------------------------------------------
221+
222+
.productView-backorder-availability-prompt {
223+
margin-left: spacing("half");
224+
}
225+
219226

220227
// Details - Product Information
221228
// -----------------------------------------------------------------------------
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{#if show_prompt}}
2+
{{#if available_to_sell '>' 0}}
3+
{{#if available_for_backorder '>' 0}}
4+
<span class="productView-backorder-availability-prompt">({{prompt}})</span>
5+
{{/if}}
6+
{{/if}}
7+
{{/if}}

templates/components/products/product-view.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ <h2 class="productView-brand">
247247
<label class="form-label form-label--alternate">
248248
{{lang 'products.current_stock'}}
249249
<span data-product-stock>{{product.stock_level}}</span>
250+
{{> components/products/backorder-availability-prompt show_prompt=product.show_backorder_availability_prompt prompt=product.backorder_availability_prompt available_to_sell=product.available_to_sell available_for_backorder=product.available_for_backorder}}
250251
</label>
251252
</div>
252253
{{> components/products/add-to-cart with_wallet_buttons=true}}

0 commit comments

Comments
 (0)