show sales report to pass the parameter like month,date to Magento Soap api -


i fetching sales report magento store use soap api. working fine show sales report. want custom report pass specific month or date. how can possible code follow.

  $mage_url = 'https://domain.com/index.php/api/soap/index/wsdl/1';    $mage_user = 'mohammad';    $mage_api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';     // initialize soap client     $soap = new soapclient( $mage_url );     // login magento    $session_id = $soap->login( $mage_user, $mage_api_key );   // start session make api requests  $resources = $soap->resources( $session_id );  $products = $soap->call($session_id, 'sales_order.list'); 

this useful developers

for completed orders

   $products = $soap->call($session_id, 'sales_order.list', array(array('status'=>array('eq'=>'complete')))); 

for specific period

 $thedate = date("y-m-d", strtotime("1 month ago"));  $thesearch =array(array('updated_at'=>array('from'=>"$thedate"), 'status'=>array('eq'=>"complete")));  $products = $soap->call($session_id, 'sales_order.list', $thesearch); 

working fine


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -