【问题标题】:How to get list carts with magento API?如何使用 magento API 获取列表购物车?
【发布时间】:2015-05-07 03:17:13
【问题描述】:

我正在使用推车开发 Magento。我使用 SOAP 创建购物车并向其中添加产品。但我能得到购物车的清单吗?以及如何激活它。

在 magento 管理员的仪表板中,我看到了

Reports > Shopping Cart > Abandoned Carts

购物车列表处于活动状态。能买到吗?

非常感谢,抱歉我的英语不好。

【问题讨论】:

    标签: api magento soap cart magento2


    【解决方案1】:

    如果您想了解报表背后的查询是如何生成的,请查看https://github.com/magento/magento2/blob/83132783e0a6bed32c45e6d06df851865e668abc/app/code/Magento/Reports/Model/Resource/Quote/Collection.php#L54 - 这是构成查询的代码。您可以看到它使用的表格字段(例如检查是否 is_active、必须至少是购物车中的一项等),然后按 updated_at 排序,以便最旧的购物车首先出现。

    http://cyrillschumacher.com/2015/01/02/magento2---search-parameters-for-the-rest-api/ 上还有一篇博文,描述了(针对 REST API)如何构建搜索。它由与 SOAP 相同的数据结构支持。

    您可以使用端点 http:///soap/default?wsdl&services=quoteCartRepositoryV1 来调出 WSDL 文件。

    抱歉,我现在没有时间自己构建 SOAP 请求,但希望这些指针对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-06
      相关资源
      最近更新 更多