Get billing information in the one page order overview section of Magento

I am trying to display payment and shipping information in the “View Order” section of the “One Page Check” section in Magento 1.7.0.

However, he simply does not want to cooperate at all. I tried several methods mentioned in different forums and in SO. But none of these methods work.

Here are the ones I've already tried.

http://www.magentocommerce.com/boards/viewthread/55281/

http://www.magentocommerce.com/boards/viewthread/55281/

Any help would be greatly appreciated! Thanks in advance.

+6
source share
3 answers
Mage::getSingleton('checkout/session')->getQuote() ->getShippingAddress() ->getData(); Mage::getSingleton('checkout/session')->getQuote() ->getBillingAddress() ->getData(); 

They will give you arrays with billing and delivery information for the current order. Depending on the context, you can also call

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

To taxes, subtotals, etc. were right.

+8
source

You can get 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"); 
0
source

You can get payment information through this code:

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

Source: https://habr.com/ru/post/919923/


All Articles