2016-04-04 19 views
-1

私は、当社のソフトウェアをShopifyに統合しようとしています。 Shopifyに複数のオプション(「バリアント「S、M、L」の&「色」、「RED、BLUE、GREEN」を含む)を含む商品を送信しようとしている場合を除き、複数のオプションが選択されている場合、Shopify APIアップロード製品エラーが発生する

これはエラーメッセージです。

(オプションが1つだけの場合は問題ありません)ここで

は、サンプルのXMLファイルです:

{ 
    "product": { 
    "id": 0, 
    "handle": "AMIN", 
    "sku": "AMIN", 
    "body_html": "", 
    "product_type": "BULK", 
    "title": "AMIN", 
    "vendor": null, 
    "variants": [ 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "S", 
     "option2": "YELLOW", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-SY", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "S YELLOW", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 1 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "S", 
     "option2": "RED", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-SR", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "S RED", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 2 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "S", 
     "option2": "BLUE", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-SB", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "S BLUE", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 3 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "M", 
     "option2": "YELLOW", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-MY", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "M YELLOW", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 4 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "M", 
     "option2": "RED", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 2, 
     "product_id": 0, 
     "sku": "AMIN-MR", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "M RED", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 5 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "M", 
     "option2": "BLUE", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-MB", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "M BLUE", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 6 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "LARGE", 
     "option2": "YELLOW", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-LY", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "LARGE YELLOW", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 7 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "LARGE", 
     "option2": "RED", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 1, 
     "product_id": 0, 
     "sku": "AMIN-LR", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "LARGE RED", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 8 
     }, 
     { 
     "id": 0, 
     "barcode": null, 
     "grams": 0.0, 
     "option1": "LARGE", 
     "option2": "BLUE", 
     "option3": null, 
     "price": 12.0000, 
     "inventory_quantity": 3, 
     "product_id": 0, 
     "sku": "AMIN-LB", 
     "weight": 0.0, 
     "weight_unit": null, 
     "image_id": null, 
     "taxable": true, 
     "title": "LARGE BLUE", 
     "requires_shipping": true, 
     "compare_at_price": 12.0000, 
     "position": 9 
     } 
    ], 
    "options": null, 
    "images": null, 
    "tags": null 
    } 
} 
+1

あなたの投稿にエラーメッセージを追加するのを忘れました。 – halfer

答えて

0

あなたがバリアントを与えているときは、製品オブジェクトのオプションを言及する必要があります。

変更"options": null,また製品から変種idからidproduct_idoption3を削除

"options":[{"name":"Size","position":1},{"name":"Color","position":2}],

へ。 Shopifyが自動的に割り当てます ids

関連する問題