Search code examples
phpmagentosybasemagento-soap-api

Magento product update using api and sybase


Im trying to update my product price using magento api but it fails for bulk data

$result = sybase_query("SELECT PartCode,CurrBasicSalesPrice FROM BasicCustPartSalesPrice WHERE CustId='FOO'"); //around 654 results   

while ($row = sybase_fetch_object($result) ) { 
try {
 $r = $this->_client->call($this->_session, 'product.update', array($row->PartCode, array('price' => $row->CurrBasicSalesPrice)));

}catch(Exception $e){

  echo $e->getMessage();  
}
}

If i use this query this will work fine

  sybase_query("SELECT PartCode,CurrBasicSalesPrice FROM BasicCustPartSalesPrice WHERE CustId='FOO' AND someother='bar'"); //around 30 results

If there any limitations for bulk update using api ?


Solution

  • Bulk updating anything on standard Magento generally causes issues. You may want to look at 3rd party alternatives for product updates like Urapidflow or Magmi.