獲取order的詳細信息

先獲取

$order = Mage::getModel('sales/order')->loadByIncrementId($orderNumber);

$order = Mage::getModel('sales/order')->load($orderId);

 

獲取信息:如果這些信息是magento自己本來就有的屬性:

 

$billing



=


$order


->


billing_address;










$billing


->


firstname



$billing


->


lastname



$billing


->


company



$billing


->


street



    $billing


->


city



$billing


->


region



$billing


->


postcode



$billing


->


country_id







$order->customer_email;










$shopping


=


$order


->


shipping_address;










$


shopping


->


subtotal



 $


shopping


->


text_amount



$


shopping


->


weight



$


shopping


->


shopping_method



    $


shopping


->


shopping_amount



$


shopping


->


grand_total



$


shopping


->


payment->last_trans_id



$


shopping


->


payment->method









http://sree.cc/magento-ecommerce-tips/some-important-functions-getmodel-getdata-getsingleton

http://www.edmondscommerce.co.uk/magento/magento-custom-model-via-magegetsingleton/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章