Hello there,
I’ve been observing something that seems strange to me.
Adding two items in cart that have some attribute(s), say
KeyA: ValueA
And having them expanded by a function with an output similar to this:
{
"operations": [
{
"expand": {
"title": "Hello",
"cartLineId": "gid://shopify/CartLine/someId1",
"expandedCartItems": [
{
"merchandiseId": "gid://shopify/ProductVariant/42836213563550",
"quantity": 1
}
]
}
},
{
"expand": {
"title": "Goodbye",
"cartLineId": "gid://shopify/CartLine/someId2",
"expandedCartItems": [
{
"merchandiseId": "gid://shopify/ProductVariant/42836213563550",
"quantity": 1
}
]
}
}
]
}
Everything looks good within the checkout page, but the attributes these cart line items had are not available within the order (neither in the UI, nor returned from the GraphQL Admin API).
Doing the same thing with identical properties, but using a merge function to merge multiple cart line items into one actually persists each cart line item’s properties and they are displayed on the order page.
This seems a bit strange as if one of the operations should remove attributes, I would expect the exact opposite to happen - the merge to remove attributes as it is merging multiple cart line items into one and potential duplicates can cause collisions.
Am I missing something as the expand functionality was suggested for usage to me by Shopify support, however it erasing attributes is a dealbreaker for our usecase?
Thanks