Skip to content

Commit 71ec9ad

Browse files
refactor: rename $backorderPromptContainer to $backorderAvailabilityPromptContainer
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 360e86e commit 71ec9ad

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

assets/js/theme/common/product-details-base.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export default class ProductDetailsBase {
200200
$input: $('[name=qty\\[\\]]', $scope),
201201
},
202202
backorderAvailabilityPrompt: {
203-
$container: $('[data-backorder-prompt]', $scope),
203+
$container: $('[data-backorder-availability-prompt]', $scope),
204204
},
205205
$bulkPricing: $('.productView-info-bulkPricing', $scope),
206206
$walletButtons: $('[data-add-to-cart-wallet-buttons]', $scope),
@@ -277,10 +277,10 @@ export default class ProductDetailsBase {
277277
}
278278

279279
// Update backorder availability prompt for complex products
280-
const $backorderPromptContainer = viewModel.backorderAvailabilityPrompt.$container;
280+
const $backorderAvailabilityPromptContainer = viewModel.backorderAvailabilityPrompt.$container;
281281

282-
if ($backorderPromptContainer.length && this.context.showBackorderAvailabilityPrompt) {
283-
const $prompt = $backorderPromptContainer.find('.productView-backorder-availability-prompt');
282+
if ($backorderAvailabilityPromptContainer.length && this.context.showBackorderAvailabilityPrompt) {
283+
const $prompt = $backorderAvailabilityPromptContainer.find('.productView-backorder-availability-prompt');
284284

285285
if (typeof data.stock === 'number' && data.stock > 0) {
286286
if ($prompt.length) {
@@ -289,7 +289,7 @@ export default class ProductDetailsBase {
289289
const promptText = this.context.backorderAvailabilityPrompt;
290290

291291
if (promptText) {
292-
$backorderPromptContainer.html(
292+
$backorderAvailabilityPromptContainer.html(
293293
`<span class="productView-backorder-availability-prompt">(${promptText})</span>`,
294294
);
295295
}

templates/components/products/product-view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ <h2 class="productView-brand">
249249
<label class="form-label form-label--alternate">
250250
{{lang 'products.current_stock'}}
251251
<span data-product-stock>{{product.stock_level}}</span>
252-
<span data-backorder-prompt>
252+
<span data-backorder-availability-prompt>
253253
{{> 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}}
254254
</span>
255255
</label>

0 commit comments

Comments
 (0)