Skip to content

Give the associated product's cart item the store of the item, not its id - #1123

Merged
KrzysztofPajak merged 1 commit into
developfrom
fix/associated-cart-item-store
Nov 25, 2026
Merged

KrzysztofPajak merged 1 commit into
developfrom
fix/associated-cart-item-store

Conversation

@KrzysztofPajak

Copy link
Copy Markdown
Member

Type: bugfix

Issue

When a cart item has an attribute value of type Associated to product, ShoppingCartItemAttributeValidator checks the associated product through a cart item it builds for it. That item got StoreId = value.ShoppingCartItem.Id, the parent cart item's id, instead of its store.

Solution

The built item takes value.ShoppingCartItem.StoreId.

The nested check reads only the attributes of the item today, so no warning changes; the item now carries the right store for any check that reads it.

Breaking changes

None.

Testing

  1. Create a product with an attribute whose value is associated to another product.
  2. Add it to the cart with that value: the attribute warnings are the same as before.

Grand.Business.Checkout builds; no test was added, as no current behavior depends on the value.

…s id

The attribute validator checks an associated product (AssociatedToProduct
attribute value) through a cart item it builds for it, and set that item's
StoreId to the parent item's Id. Nothing on that path reads the store
today, so no warning changes; the item now carries the right store for any
check that does.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@KrzysztofPajak
KrzysztofPajak merged commit 848fa4a into develop Nov 25, 2026
9 checks passed
@KrzysztofPajak
KrzysztofPajak deleted the fix/associated-cart-item-store branch November 25, 2026 19:32
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