Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show bundle components on the cart page #3478

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mironov
Copy link

@mironov mironov commented May 15, 2024

PR Summary:

Show bundle components on the cart page

Why are these changes introduced?

Fixes #3477

What approach did you take?

Render item.item_components if they are present.

Other considerations

n/a

Decision log

n/a

Visual impact on existing themes

Enhance user experience for bundles.

Testing steps/scenarios

  • Add a regular product to cart and confirm no components are rendered
  • Add a bundled product to cart and confirm that its components are rendered

Demo links

Chromium.mp4

Checklist

@NicklasT
Copy link

It seems like bundle components are still not shown on the cart page. Why has this not made it into Dawn yet?

Copy link
Contributor

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

Other than the HTML tag used looks good.
Thanks for the PR 👍

Comment on lines 130 to 135
<sub>
{{ component.title }}
{%- if component.quantity > 1 -%}
<span> × {{ component.quantity }}</span>
{%- endif -%}
</sub>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is the right element for the job. Id go with an unordered list instead maybe.

When i look at the sub element in docs, MDN for example, it does mention using them in specific scenarios:

should be displayed as subscript for solely typographical reasons

Copy link

@thagxt thagxt Jan 25, 2025

Choose a reason for hiding this comment

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

I notice others have conditionals for default variants, size, and selling plans, but there's no explicit check for whether the item is a bundle. Did we intend to add a condition for that, or is it not necessary in this particular context?

Copy link

Choose a reason for hiding this comment

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

Also if added to cart isn't this needed on orders page as well?!

Copy link
Author

Choose a reason for hiding this comment

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

@ludoboludo I've switched it to an unordered list — does it look better now?

image

It might need a bit of CSS tweaking, especially for the left margin.

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.

Render bundle components on cart page
4 participants