我尝试使用官方的shopifigapi pythonsdk以编程方式向Shopify商店添加几十种产品,但我不知道如何指定每个变体的成本。你知道吗
这是我迄今为止尝试过的:
variant = shopify.Variant()
variant.price = price
variant.option1 = size
variant.inventory_quantity = qty
variant.inventory_management = "shopify"
variant.fullfilment_service = "manual"
variant.requires_shipping = True
variant.sku = sku
variant.taxable = False
variant.inventory_policy = 'deny'
variant.cost = cost
new_product.variants.append(variant)
当然,variant.cost
不起作用。我该怎么做?还是还不支持?你知道吗
我使用的是ShopifAPI版本5.1.0,API版本是2019-07。你知道吗
不能使用variant update api调用更新单位成本,需要调用inventoryItem api来更新单位成本。你知道吗
请参考此链接https://help.shopify.com/en/api/reference/inventory/inventoryitem#update-2019-07
相关问题 更多 >
编程相关推荐