Skip to content

fix(storefront): SD-10795 Out_of_Stock banner is duplicated and overlaps Add_to_cart button on PDP#2601

Merged
bc-yevhenii-buliuk merged 1 commit intobigcommerce:masterfrom
bc-yevhenii-buliuk:SD-10795
Jan 30, 2026
Merged

fix(storefront): SD-10795 Out_of_Stock banner is duplicated and overlaps Add_to_cart button on PDP#2601
bc-yevhenii-buliuk merged 1 commit intobigcommerce:masterfrom
bc-yevhenii-buliuk:SD-10795

Conversation

@bc-yevhenii-buliuk
Copy link
Contributor

@bc-yevhenii-buliuk bc-yevhenii-buliuk commented Jan 29, 2026

What?

This PR fixes duplicate OOS banners and overlapping Add to Cart button on PDP.
Also it eliminates unnecessary AJAX on initial page load (addresses feedback from @bc-jz in PR #2198)

Additional info for visibility:
Problem:

  • Duplicate OOS banners appearing on PDP (product-level banner from Handlebars + variant-level banner from JS).
  • Unnecessary AJAX call on initial page load when product has default options.

Changes:

  • Moved product-level OOS banner inside add-to-cart-wrapper component for correct layout positioning.
  • Added duplicate banner prevention in showMessageBox to avoid showing variant-level banner if product-level banner already exists.
  • Removed unnecessary AJAX call on initial load by using BCData.product_attributes from Stencil context, which now contains correct data after PR #46317.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

Screenshots (if appropriate)

bug (track inventory on product level)

sd_10795_bug_inventory_on_product_level

behavior after fix (track inventory on product level)

sd_10795_fix_inventory_on_product_level.mov

behavior after fix (track inventory on variant level)

sd_10795_fix_inventory_on_variant_level.mov.mov

unify out-of-stock banner styling for product and variant levels

sd_10795_fix_error_baner

Copy link
Contributor

@bc-alexsaiannyi bc-alexsaiannyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@jkanive
Copy link
Contributor

jkanive commented Jan 29, 2026

@bc-yevhenii-buliuk Do you know why we have 2 different color for Sold Out message box? Its different for product level and variant level if I am seeing it correctly. But its the same message. Maybe its intentional.

@bc-yevhenii-buliuk
Copy link
Contributor Author

@bc-yevhenii-buliuk Do you know why we have 2 different color for Sold Out message box? Its different for product level and variant level if I am seeing it correctly. But its the same message. Maybe its intentional.

@jkanive As far as I know, it wasn't intentional - the variant-level banner was using a common alert style while product-level used error styling. I've unified them both to use error styling (red) for consistency.

@bc-yevhenii-buliuk bc-yevhenii-buliuk merged commit 4a26c5e into bigcommerce:master Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants