Discussions on bundle app development
My app creates some bundle products with a custom template. I try to run ProductUpdate Mutation to update these products.
When the sales channel includes POS, it gives an user error:
user_errors = [{'field': ['publications', '1', 'channelId'], 'message': 'Channel Channel Point of Sale does not support bundle products'}]
And the product cannot be successfully updated. The user error looks like a minor error but the product doesn't update at all. My users think it's working but the data is completely outdated
So I use the Admin Rest API to update the published scope to online store only:
product.published_scope = 'web'
For the products with online store and POS, it works. I run the productUpdate mutation again. And the user error is gone. However, when there are other channels like Facebook or others, the mutation gives an user error again:
'userErrors': [{'field': ['publications', '1', 'channelId'], 'message': 'Channel Channel Daxko Sales Channel does not support bundle products'}]
Look like changing the published scope doesn't work
How can I resolve this? Do I have to use publishableUnpublish to unpublish the product from the extra channels? The problem is that the productUpdate mutation doesn't give me the publication ID. It's separated from the sale channels in the latest API version. I can't do so.
Why is it so complicated to get the current sales channels of a product or publish a product to the online store only? The related fields are all deprecated
Bundles are only supported in the Online Store channel and Hydrogen. We're working to enable them in more channels. Do you have an Api client ID I can use to investigate? the product should have not been able to be published to all sales channels.
You can use `product.resourcePublicationsV2` to get the list of publication ids of a product.
To learn more visit the Shopify Help Center or the Community Blog.
My API client ID: e8d0781deff4772b55671fbcec6d1204
Actually, I only want my bundle product published to the online store channel. However, the REST API doesn't work for channels other than POS.
Yes, I can use resourcePublicationsV2 under a product. This product belongs to another dev store. I run a query in Shopify GraphiQL App to check the product fields
resourcePublicationsV2(first: 5) {
edges {
node {
publication {
id
name
catalog {
id
title
status
}
autoPublish
}
isPublished
}
}
}
But the response of the catalog always gives me null. The name field under a publication is deprecated. I can't identify which channel is it:
"resourcePublicationsV2": {
"edges": [
{
"node": {
"publication": {
"id": "gid://shopify/Publication/184386093355",
"name": "Online Store",
"catalog": null,
"autoPublish": false
},
"isPublished": true
}
},
{
"node": {
"publication": {
"id": "gid://shopify/Publication/190878515499",
"name": "Shopify GraphiQL App",
"catalog": null,
"autoPublish": false
},
"isPublished": true
}
}
When I check the product, it's published to 3 channels: Online Store, Point of Sale, Shopify GraphiQL App