FROM CACHE - zh-cn_header
此社区已转向点对点支持。Shopify 支持团队将不再为此社区提供服务。我们建议您与其他商家和合作伙伴建立联系以获取帮助,并分享您的经验! 如发现有任何违反我们行为准则的行为或您希望删除的内容,欢迎继续举报。

How to categorize products when creating them using the Python GraphQL Admin API.

How to categorize products when creating them using the Python GraphQL Admin API.

Xinzeng
Shopify Partner
1 0 0

I want to create a product, specify the category of the product, and wrote the category field, but the submission has been invalid. Products cannot be added to categories.

product = shopify.Product()
product.category = " gid://shopify/TaxonomyCategory/aa-1-12-4 "
product.product_type = "Jeans"
product.body_html = "<BR>- WOMEN'S SKINNY JEANS<BR>- COLLECTION: AUTUMN/WINTER<BR>- COMPOSITION: 70% COTTON, 27% POLYESTER, 3%/ELASTANE<BR>"
product.title = "15092650 - ONLROYAL LIFE REG SKINNY 600 NOOS"
product.vendor = "Only"
product.save()

0 条回复0