feat(backorders): BACK-466 render backorder message on PDP#2625
Open
bc-apostoliuk wants to merge 2 commits intomasterfrom
Open
feat(backorders): BACK-466 render backorder message on PDP#2625bc-apostoliuk wants to merge 2 commits intomasterfrom
bc-apostoliuk wants to merge 2 commits intomasterfrom
Conversation
- Inject backorder_messages list and product.show_backorder_message into JS context from product-view.html - Split data-product-backordered row into two spans: one for qty backordered message and one for the custom backorder message - Add updateBackorderMessage() that looks up backorder_message_id in the injected list and renders alongside the qty backordered message - Add toggleBackorderedContainer() driven solely by qty span visibility so the row is only shown when units are actually backordered - Capture backorder_message_id from optionChange API response in updateBackorderContext() always overwriting with ?? null to prevent stale IDs bleeding across variant switches - Call updateBackorderMessage() in updateView() and both quantity change handlers (button click and keyup) - For simple products (no options) make an explicit optionChange call on page init to fetch backorder_message_id Made-with: Cursor
Made-with: Cursor
EgorAleshin
approved these changes
Mar 19, 2026
bc-maksym-konohorov
approved these changes
Mar 19, 2026
animesh1987
approved these changes
Mar 20, 2026
agchan12
approved these changes
Mar 20, 2026
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-466
What/Why?
Screen.Recording.2026-03-19.at.19.26.45.mov
Renders a custom backorder message alongside the existing qty-backordered message on the Product Detail Page.
backorder_messageslist andproduct.show_backorder_messageare injected into the JS context fromproduct-view.htmldata-product-backorderedrow is split into two inner spans:data-qty-backordered-message(existing qty text) anddata-backorder-message(new custom message)updateBackorderMessage()looks upbackorder_message_id(returned byremote/v1/product-attributes/:productId) in the injected list and renders it only when the qty backordered span is also visibletoggleBackorderedContainer()is now driven solely by the qty span, so the row only shows when units are actually being backorderedupdateBackorderContext()always overwritesbackorderMessageIdwithdata.backorder_message_id ?? nullto prevent stale IDs from a previous variant bleeding through on variant switchesupdateBackorderMessage()is called inupdateView()(variant changes) and both quantity change handlers (+/-button andkeyup)optionChangecall is made on page init to fetchbackorder_message_idRollout/Rollback
Standard deployment. Rollback by reverting the PR if needed.
Testing
show_backorder_message = false— verify no custom message renders even whenbackorder_message_idis setMade with Cursor