All things Shopify and commerce
I am creating a complex Shopify application.
Using the 2024-10 version of the GraphQL API, I created a fulfillmentService using the following mutation:
mutation fulfillmentServiceCreate($name: String!, $callbackUrl: URL!, $inventoryManagement:Boolean!, $permitsSkuSharing:Boolean!) { fulfillmentServiceCreate(name: $name, callbackUrl: $callbackUrl, inventoryManagement:$inventoryManagement, permitsSkuSharing:$permitsSkuSharing) { fulfillmentService { id serviceName callbackUrl fulfillmentOrdersOptIn permitsSkuSharing handle inventoryManagement location { id legacyResourceId } } userErrors { field message } } }
Next, I used the Bulk Product Variant Creation API:
mutation productVariantsBulkCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!, $strategy: ProductVariantsBulkCreateStrategy, $media: [CreateMediaInput!]) { productVariantsBulkCreate(productId: $productId, media: $media, variants: $variants, strategy: $strategy) { userErrors { field message } product { id options { id name values position optionValues { id name hasVariants } } } productVariants { id title selectedOptions { name value } } } }
For the $variants parameter, I set the locationId of inventoryQuantities to the fulfillmentService.localtion.id of the :
After completing these steps:
Screenshots of the issue:
Question:
Why is the inventory showing correctly in the backend but displaying "Sold Out" on the product page? Is there a solution to this issue?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024