Get billing information in order review section of one page checkout in Magento

笑着哭i 提交于 2019-12-04 06:51:19
Mage::getSingleton('checkout/session')->getQuote()
                                      ->getShippingAddress()
                                      ->getData();


Mage::getSingleton('checkout/session')->getQuote()
                                      ->getBillingAddress()
                                      ->getData();

Will give you arrays with the billing and shipping information for the current order. Depending on context, you may also have to call

Mage::getSingleton('checkout/session')->getQuote()
                                      ->collectTotals();

For the order taxes, subtotals, etc to be correct.

You can get the addresses as objects:

$checkout = Mage::getSingleton('checkout/session')->getQuote();
$billing = $checkout->getBillingAddress();
$shipping = $checkout->getShippingAddress();

and show them as html text:

echo $billing->format("html");
echo $shipping->format("html");

You can get Billing information through this code:

Mage::getSingleton('checkout/session')->getQuote()
                                  ->getBillingAddress()
                                  ->getData();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!