feat(backorders): BACK-470 add backorder availability prompt for complex products#2610
Draft
bc-apostoliuk wants to merge 5 commits intomasterfrom
Draft
feat(backorders): BACK-470 add backorder availability prompt for complex products#2610bc-apostoliuk wants to merge 5 commits intomasterfrom
bc-apostoliuk wants to merge 5 commits intomasterfrom
Conversation
…lex products - Dynamically show/hide backorder availability prompt when variant options change on complex products, mirroring the existing simple product behavior - Inject product-level backorder config into JS context and update the prompt in updateView based on variant stock data - Fix updateDefaultAttributesForOOS disabling controls when product attributes data is empty (undefined !== false) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
bc-maksym-konohorov
approved these changes
Feb 17, 2026
…ewModel Co-authored-by: Cursor <cursoragent@cursor.com>
…romptContainer Co-authored-by: Cursor <cursoragent@cursor.com>
71d3cb3 to
71ec9ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: BACK-470
What/Why?
Complex products (with variants/options) did not dynamically update the backorder availability prompt when a shopper changed product options. This PR adds that support by:
Backorder prompt for complex products — Injects product-level backorder config (
showBackorderAvailabilityPrompt,backorderAvailabilityPrompt) into the JS context and wraps the prompt element in adata-backorder-promptcontainer. TheupdateViewmethod now dynamically shows/hides the prompt based on variant stock data when options change, mirroring the existing simple product Handlebars behavior.Fix disabled quantity controls on products with empty attributes — The
updateDefaultAttributesForOOSmethod was using loose falsy checks (!data.purchasable || !data.instock) which treatedundefinedthe same asfalse. Whenwindow.BCData.product_attributesreturned an empty object, this incorrectly disabled the quantity controls and Add to Cart button. Changed to strict equality (=== false) so controls are only disabled when the API explicitly reports the product as not purchasable or out of stock.Rollout/Rollback
Standard deployment. Rollback by reverting the PR if needed.
Testing
Backorder prompt (complex product):
Backorder prompt (simple product):
Quantity controls fix:
window.BCData.product_attributesis an empty object (e.g., a sample product without full configuration)Out-of-stock behavior:
Made with Cursor