Magento receives the selected delivery address and billing address fields

How can I get selected fields for delivery and billing during checkout? (I want to show them in the side panels)

I use this in shipping.phtml, but, of course, only for the current "address" (and I want to use it in .phtml methods and other pages).

$this->getAddress()->getFirstname() 

So I assumed this would work ...

 Mage::getSingleton('checkout/session')->getShippingAddress()->getFirstname() 

But it is not, does anyone have a clue?

Addition: It helped me a lot, but I got stuck: -S How do I choose the delivery method that the user chose during checkout?

+7
source share
1 answer

Delivery and billing addresses are children of the quote object. So something like this will work:

 Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getFirstname(); 
+11
source

All Articles