0
製品の作成時にダウンロード可能なリンクを設定しようとしましたが、製品を更新しようとしましたが動作しませんでした。 REST APIを使用してMagento/productダウンロード可能なリンクを設定する方法
は、私はそれが私にこのリンクフィールドがあるべき、それが保持すべきか、このエラーメッセージobject(stdClass)[163]
public 'message' => string '%fieldName is a required field.' (length=31)
public 'parameters' =>
object(stdClass)[164]
public 'fieldName' => string 'link'
を与えることが
POST "/v1/products/$sku/downloadable-links"
この
$downloadable_product_links = [
[
'id' => 1
, 'title' => json_encode(["resolution" => "1000x2000 px", "dpi" => "72", "size" => "16 KB"])
, 'sort_order' => 1
, 'is_shareable' => 1
, 'price' => 15
, 'link_type' => 'url'
, 'link' => 'https://my-domain/image/DSC_0801.JPG'
, 'link_url' => 'https://my-domain/image/DSC_0801.JPG'
],
[
'id' => 2
, 'title' => json_encode(["resolution" => "150x200 px", "dpi" => "72", "size" => "18 KB"])
, 'sort_order' => 2
, 'is_shareable' => 1
, 'price' => 14
, 'link_type' => 'url'
, 'link' => 'https://my-domain/image/DSC_0801.JPG'
, 'link_url' => 'https://my-domain/image/DSC_0801.JPG'
]
];
$result = MagentoConn::instance()->reqPOST("/products/$sku/downloadable-links", $downloadable_product_links);
のように、このエンドポイントを試してみました?上記の配列のキーとして置くことを試みたが、例外を与えた"no setter"