fix(storefront): TRAC-1466 Show option-set rule message on rule-blocked options - #2735
Merged
bc-yevhenii-buliuk merged 1 commit intoSep 3, 2026
Merged
Conversation
bc-yevhenii-buliuk
force-pushed
the
TRAC-1466
branch
from
September 2, 2026 11:49
8bd366a to
4efa05c
Compare
jairo-bc
reviewed
Sep 2, 2026
bc-yevhenii-buliuk
force-pushed
the
TRAC-1466
branch
2 times, most recently
from
September 2, 2026 14:33
56861b3 to
bed3267
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit bed3267. Configure here.
bc-yevhenii-buliuk
force-pushed
the
TRAC-1466
branch
from
September 2, 2026 15:25
bed3267 to
babb7c8
Compare
bc-yevhenii-buliuk
force-pushed
the
TRAC-1466
branch
from
September 2, 2026 18:52
babb7c8 to
781a014
Compare
jairo-bc
approved these changes
Sep 3, 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.

What?
Cornerstone versions after 6.19.0 stopped showing an option-set rule's custom "unavailable" message (e.g. "This Size Temporarily Sold Out"), even though Add to Cart and the quantity input still correctly
disabled. This affects legacy-catalog (v2) products with no SKUs, an option-set rule set to "unavailable for purchase" with a custom message, and product-level inventory tracking off.
Root cause: in product-details-base.js, updateView() called showMessageBox() (which renders the rule's message) before updateDefaultAttributesForOOS(). The latter calls toggleSoldOutAlert(), which
unconditionally hides that same message box whenever the product itself is sellable (instock: true) - regardless of whether the specific option combination is blocked by a rule (purchasable: false). The backend
sends exactly this combination (instock: true + purchasable: false) when inventory isn't tracked at the product level, so the rule's message was shown and then immediately hidden on every option change.
Fixes:
Testing:
Verified both with unit tests and manually on two live stores, since option-set rules (no-SKU products) and backorder limits (SKU-level) can't coexist on the same product:
Requirements
Tickets / Documentation
Screenshots (if appropriate)
FIX 1
Tested using bundle with the fixes in staff sandbox that has legacy product catalogue (v2)
before:
Screen.Recording.2026-09-02.at.14.31.54.mov
after:
Screen.Recording.2026-09-02.at.14.31.06.mov
FIX 2
before:
Screen.Recording.2026-09-02.at.20.19.04.mov
after:
Screen.Recording.2026-09-02.at.20.19.38.mov
FIX 3
before:
Screen.Recording.2026-09-02.at.20.46.07.mov
after:
Screen.Recording.2026-09-02.at.20.39.30.mov
Note
Medium Risk
Touches PDP option-change messaging and add-to-cart/qty-limit ordering; regression risk for backorder quantity limits and OOS flows, though changes are narrowly scoped to message box timing and flags.
Overview
Restores custom option-set rule messages on the PDP when a combination is unpurchasable but the product still looks sellable (e.g. legacy v2, no SKUs, inventory not tracked at product level). Add to Cart and quantity were already disabled; the alert text was missing or wrong.
In
product-details-base.js,showMessageBoxnow runs afterupdateDefaultAttributesForOOS, sotoggleSoldOutAlertno longer hides the variant alert wheneverinstock/ ATS says the product can sell while the selected options are rule-blocked.showMessageBoxclearsdata-qty-limitwhen it sets a rule/stock message soupdateAddToCartForQtydoes not treat that box as its own and clear or replace it.updateAddToCartForQtyskips the “maximum purchasable quantity” message when quantity controls are already disabled (rule or true OOS); it only keeps Add to Cart disabled instead of swapping the shopper’s real reason for a qty-cap message.CHANGELOG Draft entry added for [#2735].
Reviewed by Cursor Bugbot for commit 781a014. Bugbot is set up for automated code reviews on this repo. Configure here.