fix(storefront): SD-11524 Add to Cart and quantity buttons disabled on Integration store when BCData is empty#2612
Merged
bc-yevhenii-buliuk merged 1 commit intobigcommerce:masterfrom Feb 23, 2026
Conversation
084dc35 to
924da68
Compare
cb466b8 to
4e59fc8
Compare
Contributor
|
makes sense to me. @bc-yevhenii-buliuk, what do you think if we add |
4e59fc8 to
b313683
Compare
…n Integration store when BCData is empty
b313683 to
e0962ae
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.
What?
This PR adds defensive validation before calling
updateView()on product detail page initialization to prevent disabledAdd to Cartand quantity+/-buttons whenBCData.product_attributesis empty.Problem
After merging PR #2601,
Add to Cartand quantity+/-buttons are disabled on Integration store for simple product (without inventory tracking). The issue doesn't occur on Production/Staging.PR #2601 removed the initial AJAX call and relies on
BCData.product_attributesbeing populated on page load. On Integration store, this data is empty (BCData={}), causingupdateView()to be called with empty data, which incorrectly triggers the disable logic inupdateDefaultAttributesForOOS()method.So we need to ensure that
updateView()is only executed when actual product data is available.Fixes the issue:
Buttons now work correctly on Integration store for simple products
No regression on Production/Staging environments
Variant selection continues to work properly (AJAX provides full data)
Known limitation:
When
BCData.product_attributesis empty, out-of-stock UI features (disabled buttons, banners) may not display on initial page load. This is defensive behavior to prevent incorrect states from processing invalid data.Requirements
Tickets / Documentation
Screenshots (if appropriate)
integration_without_BCData.mov
staging_with_BCData.mov