How can i get all of the purchased products in magento? -


i'm newbie in magento. code :

<?php      $_orders = $this->getorders();     foreach ($_orders $_order){          var_dump($_order->getstatus());     }  ?> 

this return me smth :

string(7) "pending" string(10) "processing" string(7) "pending" string(7) "pending" string(7) "pending" string(10) "processing" string(10) "processing" string(7) "pending" string(7) "pending" string(8) "complete"  

but want of "complete" items . how can ?

try $order->getstate()

$_orders = mage::getmodel('sales/order')->getcollection(); // completed order  //$_orders->addfieldtofilter('state', mage_sales_model_order::state_complete);  foreach ($_orders $_order){         var_dump($order->getstate());         var_dump($_order->getdata()); // return field in sale_flat_order table         //$_order->getstatus() = $_order->getdata('status') - return status field } 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -