【问题标题】:How to get magento product id while creating id with REST API如何在使用 REST API 创建 id 时获取 magento 产品 id
【发布时间】:2016-04-27 10:21:13
【问题描述】:

如何在代码中的某个点使用 REST API 创建产品 ID 时将产品 ID 传递给此方法:

class Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
...
    $this->_multicall($product->getId()); #line 172
...

问候,

【问题讨论】:

    标签: rest magento magento-1.9


    【解决方案1】:

    好的,我做到了。我已经覆盖Mage_Catalog_Model_Api2_Product_Rest_Admin_V1 和我一起在_create() 之前$this->_multicall($product->getId()); 我添加了:

    # Return magento product id in response
    $this->getResponse()->setBody(json_encode(array(
        'magento_product_id' => $product->getId()
    )));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-23
      • 2019-03-03
      • 1970-01-01
      • 2023-03-12
      • 2016-09-17
      • 1970-01-01
      相关资源
      最近更新 更多