0

I am trying to update the inventory using multiCall, but it seems that it's only taking the first digit. Here is my php code:

$stockItemData = array(
    'sku' => 'somesku-30',
    'qty' => '32'
);

$result = $client->multiCall($sid, array(
     array('product_stock.update', $stockItemData)
));

When I look at the product in the control panel, I can only see that the quantity is set to 3. If I try to update with 40, then the control panel shows 4. If I try with 50, it shows 5 only etc..

Any ideas?

  • The data is actually taken as-is when looking into the update() function in app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php. You can try to debug there and/or in $product->setStockData($stockData); to see which data is used here or where it goes wrong. – Anna Völkl Feb 19 '15 at 19:51
  • Any customization you did on the API or product stock? – Anna Völkl Feb 19 '15 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.