duanbinian2243 2016-03-03 17:42
浏览 38

如何解析Magento SOAP V1 Php类别树

I'm building a mobile app on Magento using Soap API V1. On calling Category tree api, i get a response as shown below. I want to be able to convert it to JSON but I'm not able to parse it at all. Any suggestions from experienced PHP/Magento developers will be of great help. Thanks in advance.

Response:

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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度