magento rest api获取产品尺寸

时间:2018-12-12 14:47:52

标签: php rest magento

我希望在Magento网上商店中获得所有产品。我有以下使用phpGuzzle的代码:

$response = $client->get('https://magentohost/api/rest/products?limit=100&page='. $i, [
    RequestOptions::AUTH => ['key', 'secret'],
    RequestOptions::HEADERS => [
        'content-type' => 'application/json',
        'Accept' => 'application/json',
    ]
]);
$json = json_decode((string) $response->getBody(), true);

问题是,我得到的结果是产品列表:

array:14 [
    "entity_id" => "778"
  "attribute_set_id" => "13"
  "type_id" => "configurable"
  "sku" => ".."
  "price" => "160.0000"
  "tax_class_id" => "2"
  "visibility" => "4"
  "status" => "1"
  "description" => ".."
  "short_description" => ".."
  "meta_keyword" => ".."
  "name" => ".."
  "meta_title" => ".."
  "meta_description" => "."
]

如何获取尺寸,品牌,颜色等信息?

0 个答案:

没有答案