Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-products-to-cart-empty-customizable-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

Fix the add-to-cart success message counting 0 when the added cart item has no `customizable_options` to match the requested entered/selected options against. `findAddedItems` now falls back to the SKU (+ configurable variant) match instead of dropping the item.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export function findAddedItems(
}

const { customizable_options } = cartItem
// No customizable_options to match against — trust the SKU candidacy rather than drop the item.
if (customizable_options.length === 0) return true
const matchEntered = filterNonNullableKeys(itemVariable.entered_options).every(
(requestOption) =>
customizable_options.find(
Expand Down
Loading