Skip to content

Conversation

patrickDouglas
Copy link
Contributor

@patrickDouglas patrickDouglas commented Jul 11, 2025

Background

This PR adds parent/parentRelationship properties to CartLines for Checkout, enabling the representation of relationships between cart lines. Follow up to the private repo change.

Solution

Added support for parent-child relationships between cart lines in the Checkout API:

  1. Added a new CartLineParentRelationship interface that contains parent line information
  2. Added the parentRelationship property to the CartLine interface
  3. Added optional parent property to CartLineAddChange and CartLineUpdateChange interfaces to allow setting parent relationships when adding or updating cart lines
  4. Exported the new CartLineParentRelationship type

These changes enable extensions to work with hierarchical cart line structures, such as bundles or add-ons that are associated with a parent product.

🎩

  • Test adding a cart line with a parent relationship
  • Test updating a cart line to associate it with a parent
  • Verify parent relationships are correctly displayed in the UI

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@lrsterrett lrsterrett left a comment

Choose a reason for hiding this comment

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

Everything looks right to me. I can't remember but did you end up tophatting the locally generated docs to see if this property showed up correctly?

@patrickDouglas
Copy link
Contributor Author

Everything looks right to me. I can't remember but did you end up tophatting the locally generated docs to see if this property showed up correctly?

@lrsterrett I did 😄 It looked good to me!

@patrickDouglas patrickDouglas marked this pull request as ready for review July 14, 2025 19:35
Copy link
Contributor Author

@patrickDouglas patrickDouglas left a comment

Choose a reason for hiding this comment

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

How many ✅ do y'all typically like to have per release? Is one enough?

Copy link
Contributor Author

patrickDouglas commented Jul 14, 2025

Merge activity

  • Jul 14, 9:16 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 14, 9:17 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 14, 9:18 PM UTC: @patrickDouglas merged this pull request with Graphite.

@patrickDouglas patrickDouglas force-pushed the checkout-cartlines-parentrelationship branch from 57b05dd to c364a95 Compare July 14, 2025 21:17
@patrickDouglas patrickDouglas merged commit 2c91fe4 into 2025-10-rc Jul 14, 2025
5 checks 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.

2 participants