All things Shopify and commerce
Hello,
I am using Storefront API to get the order history of the users, then I list the different line_items. But some line_items have the variants object to null, I need this object because it contains several information.
Do you know why some line_item have the variants object to null?
Thank you.
Fair to assume that the items missing no longer exist in the shop? So the reference being nullified would be a reflection of that.
Hello Jason,
Thank you for your answer but this is not the case for all products. Some old products are no longer available, but others recent products are still available but with an empty object variant.
Any news on this? I'm having exactly the same problem
Items exists in the shop, status is set to active.
But the variants field returns null.
Also - if it was a reflection of the item missing or no longer existing howcome its returning valid data for title etc?
According to Shopify docs:
Deleted objects are not available in the API. The product variant ID is the only detail you can get when a product variant is deleted. Other details are not available.
https://help.shopify.com/en/manual/shopify-flow/reference/triggers/product-variant-deleted#api-detai...
I see that REST API returns the variantid but other details are null. whereas GraphQL returns variant null
We also are seeing this when using the checkoutCreate storefront mutation, no errors no issues, but this is what is returned for the checkout lineItems:
"lineItems": {
"nodes": [
{
"title": "Personalized Cartoon Phone Case",
"quantity": 1,
"variant": null
}
]
}
Any ideas? The product is available in the custom app's sales channel.
We can also query this ProductVariant node from the storefront api with no issues as well.
This only happens with random variants and we can't seem to figure out why.
Is there an update on this??
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024