【问题标题】:Magento 1 order creation with disabled produt via soap API通过soap API使用禁用产品创建Magento 1订单
【发布时间】:2016-02-29 14:15:06
【问题描述】:

我正在使用 Magento 1.7,我想通过 magento SOAP API 创建一个订单,其中包含“禁用”产品。

有可能吗?

代码:

// create order
echo "\nI will create the order: ";
$resultOrderCreation = $proxy->call($sessionId,"cart.order",array($shoppingCartId, null, $licenseForOrderCreation));
echo "\nOrder created with code:".$resultOrderCreation."\n";

这是错误跟踪:

我将创建订单:

致命错误:未捕获的 SoapFault 异常:[SOAP-ENV:Server] 调用 test2.php:175 中非对象上的成员函数 getId() 堆栈 追踪:

0 test2.php(175): SoapClient->__call('call', Array)

1 test2.php(175): SoapClient->call('6e2ee08630a720a...', 'cart.order', Array)

2 {main} 在第 175 行的 test2.php 中抛出

【问题讨论】:

    标签: soap


    【解决方案1】:

    您需要更改 Mage_Sales_Model_Quote_Address_Total_Subtotal::_initItem。 具体一行代码:

    if (!$product || !$product->isVisibleInCatalog()) {
        return false;
    }
    

    删除/自定义 !$product->isVisibleInCatalog()。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多