How to get all Magento Order status (List all magento order status) -


how list of magento order status (pending, complete, processing etc.)?

it should show values "status" drop down field in order-index grid page in magento backend.

just use simple line of code:

mage::getmodel('sales/order_status')->getresourcecollection()->getdata(); 

for example:

var_dump(   mage::getmodel('sales/order_status')->getresourcecollection()->getdata()  ); 

result:

array(10) { [0]=> array(2) { ["status"]=> string(8) "canceled" ["label"]=> string(8) "canceled" } [1]=> array(2) { ["status"]=> string(6) "closed" ["label"]=> string(6) "closed" } [2]=> array(2) { ["status"]=> string(8) "complete" ["label"]=> string(8) "complete" } [3]=> array(2) { ["status"]=> string(5) "fraud" ["label"]=> string(15) "suspected fraud" } [4]=> array(2) { ["status"]=> string(6) "holded" ["label"]=> string(7) "on hold" } [5]=> array(2) { ["status"]=> string(14) "payment_review" ["label"]=> string(14) "payment review" } [6]=> array(2) { ["status"]=> string(7) "pending" ["label"]=> string(7) "pending" } [7]=> array(2) { ["status"]=> string(15) "pending_payment" ["label"]=> string(15) "pending payment" } [8]=> array(2) { ["status"]=> string(14) "pending_paypal" ["label"]=> string(14) "pending paypal" } [9]=> array(2) { ["status"]=> string(10) "processing" ["label"]=> string(10) "processing" } } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -