I have multiple line items in the cart, including frames and add-ons such as lenses and lens coatings. I aim to consolidate these items into bundles to streamline the customer experience by not displaying individual add-ons. However, before bundling, I need to adjust the pricing to align with our pair pricing sales plan. Currently, I’m executing the update operation prior to the merge operation, but it appears that the pricing updates are not being applied to the merged bundles.
I’m aware that there’s a price adjustment applied at the bundle level, but it’s a percentage decrease which isn’t sufficient for our needs. We require price adjustments to be applied at the cart line item level when merging line items.
I attempted to carry out the operations separately, first updating and then merging. However, it seems that the pricing isn’t getting updated within the bundles.
Do you have any suggestions on how I can ensure that the pricing adjustments are correctly applied during the merge process?
Here is Input query:
query RunInput {
cart {
lines {
id
quantity
cost {
amountPerQuantity {
amount
currencyCode
}
}
# Cart line attribute to get the uuid
groupId: attribute(key: "_groupId") {
key
value
}
merchandise {
__typename
... on ProductVariant {
id
title
product {
id
title
productType
}
}
}
}
}
}
Here is the output
{
"operations": [
{
"update": {
"cartLineId": "gid://shopify/CartLine/f51c4593-6924-4588-a07f-c2eaf366504d",
"price": {
"adjustment": {
"fixedPricePerUnit": {
"amount": 49.99
}
}
}
}
},
{
"update": {
"cartLineId": "gid://shopify/CartLine/667d7210-7ede-4fa4-bc9c-f74e7ba0415b",
"price": {
"adjustment": {
"fixedPricePerUnit": {
"amount": 49.99
}
}
}
}
},
{
"update": {
"cartLineId": "gid://shopify/CartLine/cd5675f9-e5e7-4436-9dd1-a7d941d87f5c",
"price": {
"adjustment": {
"fixedPricePerUnit": {
"amount": 49.99
}
}
}
}
},
{
"update": {
"cartLineId": "gid://shopify/CartLine/7715b663-aeaa-4e64-97bd-9931f679b05d",
"price": {
"adjustment": {
"fixedPricePerUnit": {
"amount": 49.99
}
}
}
}
},
{
"update": {
"cartLineId": "gid://shopify/CartLine/0e5ccd88-1249-4104-884c-d1b73508cc71",
"price": {
"adjustment": {
"fixedPricePerUnit": {
"amount": 49.99
}
}
}
}
},
{
"merge": {
"parentVariantId": "gid://shopify/ProductVariant/43955741491361",
"title": "Bill Bass : Reema",
"image": {
"url": "https://cdn.shopify.com/s/files/1/0634/0624/4001/files/BILL_BASS-REEMA-9416996015538-1.jpg?v=1711595712"
},
"cartLines": [
{
"cartLineId": "gid://shopify/CartLine/f51c4593-6924-4588-a07f-c2eaf366504d",
"quantity": 1
},
{
"cartLineId": "gid://shopify/CartLine/667d7210-7ede-4fa4-bc9c-f74e7ba0415b",
"quantity": 1
},
{
"cartLineId": "gid://shopify/CartLine/cd5675f9-e5e7-4436-9dd1-a7d941d87f5c",
"quantity": 1
},
{
"cartLineId": "gid://shopify/CartLine/7715b663-aeaa-4e64-97bd-9931f679b05d",
"quantity": 1
}
]
}
}
]
}