There’s a store where their recommended products can be added to cart, even if they are out of stock, and the “continue selling when out of stock” setting is inactive.
For some reason, after following Ajax API requests (like /add or /update), the cart still shows these out of stock products in the items array, but with quantity: 0.
Example:
{
"id": 51294307451222,
"properties": {},
"quantity": 0,
"variant_id": 51294307451222,
"key": "51294307451222:607d828368faf72c2987cdbca9bdfc9c",
"title": "Monalisa - Navy - 34",
"product_title": "Monalisa - Navy",
"variant_title": "34",
"price": 0,
"original_price": 0,
"discounted_price": 0,
"line_price": 0,
"original_line_price": 0,
"presentment_price": 0,
"total_discount": 0,
"discounts": [],
"sku": "0225-2090-86\\50\\34",
"grams": 700,
"vendor": "Junge",
"taxable": true,
"product_id": 9815705944406,
"product_has_only_default_variant": false,
"gift_card": false,
"final_price": 0,
"final_line_price": 0,
"url": "/products/monalisa-kv-86-navy?variant=51294307451222",
"featured_image": {
"alt": "Junge Monalisa Kv. 86 50-Navy",
"aspect_ratio": 0.667,
"height": 1499,
"url": "...",
"width": 1000
},
"image": "...",
"handle": "monalisa-kv-86-navy",
"requires_shipping": true,
"product_type": "Kv. 86",
"untranslated_product_title": "Monalisa - Navy",
"product_description": "...",
"untranslated_variant_title": "34",
"variant_options": [
"34"
],
"options_with_values": [
{
"name": "Størrelse",
"value": "34"
}
],
"line_level_discount_allocations": [],
"line_level_total_discount": 0
},
Does anyone know what could be causing this? Or is this some internal Shopify bug? If anyone from the team at Shopify wants to see the bug, reach out to me and I’ll send you the store link (for the merchant’s privacy).
Any insight is appreciated, thank you!
What type of topic is this
Bug report
