I am updating the cataloginventory_stock_item custom quanty values based on stock ids by using custom api.

I written a update table query in custom api module model file:

Like below:

 public function hello() {

$conn = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = "UPDATE cataloginventory_stock_item SET qty = '{$new_quantity}' WHERE stock_id = '{$stock_id}' and product_id = $id";
return true;

But here in this file iam passing the values in this file only, but I want to pass the values from api file which is running from root folder.

How to pass the values from api file which is in root folder.

Root folder api file:


$soap = new SoapClient('', array('exceptions' => 0));
$sessionId = $soap->login('test','test@123');

$result = $soap->call($sessionId, 'customapi.hello',array($myhellomsg));





Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.