API-确定细节是简单的,捆绑包还是捆绑包的组成部分



我使用API在Magento中提取新订单。我想知道我如何判断这是捆绑包的简单产品,捆绑包还是组件。

要获取详细信息,我使用saapobject方法for" sales_order.info'

$details = $this->soapObject->call($this->sessionId, 'sales_order.info', $orderId); 

当我转储详细信息时,看起来像这样:

array(15) {
  ["product_id"]=>
  string(3) "232"
  ["weight"]=>
  string(6) "1.0000"
  ["sku"]=>
  string(12) "BD22"
  ["name"]=>
  string(28) "BUNDLED_PRODUCT22"
  ["qty_ordered"]=>
  string(6) "2.0000"
  ["price"]=>
  string(6) "0.0000"
  ["discount_percent"]=>
  string(6) "0.0000"
  ["discount_amount"]=>
  string(6) "0.0000"
  ["base_discount_amount"]=>
  string(6) "0.0000"
  ["discount_invoiced"]=>
  string(6) "0.0000"
  ["base_discount_invoiced"]=>
  string(6) "0.0000"
  ["tax_percent"]=>
  string(6) "0.0000"
  ["tax_amount"]=>
  string(6) "0.0000"
  ["row_weight"]=>
  string(6) "0.0000"
  ["price_incl_tax"]=>
  string(6) "0.0000"
}

您需要使用另一个肥皂服务catalog_product.info

假设product_id *是Magento产品实体ID,将其传递给catalog_product.info SOAP调用以获取产品详细信息。

响应将包含一个名为type的字段,该字段包含产品类型。


* afaik it_product_id不是原始的洋红色字段。看起来您正在使用一些第三方模块,该模块覆盖了Magento API。

最新更新