Hey,
I got a few products that already exists, and now i wan’t to add some Variants to the Product,
For example: I’m selling a Light Bulb 5 watts, but now i want to create a 10 watts one that is the Variant to the main product, i tried some mutations but none is working.
Hi @flavio_ns ,
can you please confirm which theme you are using?.
Thanks
Hey, i’m using the Standard one (i’m doing some tests in the free versions, when everything is 100% i’ll get the Pro).
@flavio_ns sounds good refer to the this tutorial how to add variants of the products.
You can use below API to add variants to the product.
Also check this link:- https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/productvariantsbulkcreate
mutation AddProductVariants($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkCreate(productId: $productId, variants: $variants) {
productVariants {
id
title
selectedOptions {
name
value
}
}
userErrors {
field
message
}
}
}