Skip to content

fix(checkout): On the cart page, fix bundled item stock section showing title with no content#2668

Merged
bc-shawnwang merged 2 commits into
masterfrom
BACK-478-fix
May 27, 2026
Merged

fix(checkout): On the cart page, fix bundled item stock section showing title with no content#2668
bc-shawnwang merged 2 commits into
masterfrom
BACK-478-fix

Conversation

@bc-shawnwang

@bc-shawnwang bc-shawnwang commented May 27, 2026

Copy link
Copy Markdown
Contributor

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

image

So this PR is to fix that bug.

Details:

For each bundled item, uses assignVar/getVar to pre-compute three boolean display flags:

  • showOnHandQtyshow_quantity_on_hand + quantity_on_hand + quantity_backordered all truthy
  • showBackorderedQtyshow_quantity_on_backorder + quantity_backordered both truthy
  • showBackorderMessageshow_backorder_message + backorder_message both truthy
  • the entire stock section (including the item name label) is guarded by {{#or (getVar ...) ...}} so the title only renders when at least one condition is met (at least one field is displayed)

Requirements

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

Tickets / Documentation

Add links to any relevant tickets and documentation.

Screenshots (if appropriate)

If no backorder prompts to show for bundled item

before fix:

image

🔴 picklist item title is displayed when no backorder prompts displayed

after fix:

image

✅ 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:

image

@bc-shawnwang bc-shawnwang marked this pull request as ready for review May 27, 2026 08:22
@bc-shawnwang bc-shawnwang requested a review from a team as a code owner May 27, 2026 08:22
Comment thread templates/components/cart/content.html
Comment thread templates/components/cart/content.html
@bc-shawnwang bc-shawnwang merged commit 5ee1c72 into master May 27, 2026
1 check passed
@bc-shawnwang bc-shawnwang deleted the BACK-478-fix branch May 27, 2026 10:34
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.

3 participants