fix(checkout): On the cart page, fix bundled item stock section showing title with no content#2668
Merged
Conversation
…page - fix small condition check bug for render on-hand qty
bc-shawnwang
commented
May 27, 2026
bc-shawnwang
commented
May 27, 2026
animesh1987
approved these changes
May 27, 2026
bc-yevhenii-buliuk
approved these changes
May 27, 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?
I just merged a PR: #2663 but found a display bug:
The bundled item section heading (e.g. "bundle1:") was rendered even when no stock data would be displayed, leaving a floating label with no content beneath it
So this PR is to fix that bug.
Details:
For each bundled item, uses
assignVar/getVarto pre-compute three boolean display flags:showOnHandQty—show_quantity_on_hand+quantity_on_hand+quantity_backorderedall truthyshowBackorderedQty—show_quantity_on_backorder+quantity_backorderedboth truthyshowBackorderMessage—show_backorder_message+backorder_messageboth truthy{{#or (getVar ...) ...}}so the title only renders when at least one condition is met (at least one field is displayed)Requirements
Tickets / Documentation
Add links to any relevant tickets and documentation.
Screenshots (if appropriate)
If no backorder prompts to show for bundled item
before fix:
🔴 picklist item title is displayed when no backorder prompts displayed
after fix:
✅ picklist item tile is NOT displayed when no backorder prompts displayed
if sth to show for the bundled item
before and after fix its the same: