Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I installed a 17Track APP, which helped me create many additional products. Now I want to use StorefrontAPI in my self-built store and manually add variant Ids to the shopping cart as needed. But now the storefront API returned an error to me.
{
"data": {
"cartLinesAdd": {
"userErrors": [
{
"field": [
"lines",
"0",
"merchandiseId"
],
"message": "The merchandise with id gid://shopify/ProductVariant/xxxxxxxxxxx does not exist."
}
],
"cart": null
}
}
}
Hi Xuan1,
Is this only happening with products created by the 17Track app?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Yes, only the products created by 17Track will have this issue. Could it be that StorefrontAPI does not have these permissions? I don't encounter this error when calling the Ajax API.
That is certainly possible - have you contacted the 17Track team to see if they're aware of behaviour like this?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Contacted 17Track, after creating a product in the 17Track application, an error was reported when calling the Shopify API interface (adding products to the shopping cart). This error is responded by Shopify and has nothing to do with 17Track. This issue only occurs in the Storefront API, not in the Shopify Ajax API.