如何解析Magento SOAP V1 Php类别树

时间:2016-03-03 17:42:48

标签: php magento soap tree magento-1.7

我正在使用Soap API V1在Magento上构建移动应用程序。在调用Category tree api时,我得到一个响应,如下所示。我希望能够将其转换为JSON,但我根本无法解析它。来自经验丰富的PHP / Magento开发人员的任何建议都会有很大帮助。提前谢谢。

响应:

array
'category_id' => string '1' (length=1)
'parent_id' => string '0' (length=1)
'name' => string 'Root Catalog' (length=12)
'is_active' => null
'position' => string '0' (length=1)
'level' => string '0' (length=1)
'children' =>
 array
  0 =>
    array
      'category_id' => string '2' (length=1)
      'parent_id' => string '1' (length=1)
      'name' => string 'Default Category' (length=16)
      'is_active' => string '1' (length=1)
      'position' => string '1' (length=1)
      'level' => string '1' (length=1)
      'children' =>
        array
          ...
  1 =>
    array
      'category_id' => string '3' (length=1)
      'parent_id' => string '1' (length=1)
      'name' => string 'root_category' (length=13)
      'is_active' => string '1' (length=1)
      'position' => string '2' (length=1)
      'level' => string '1' (length=1)
      'children' =>
        array

0 个答案:

没有答案