Magento get chosen shipping and billing method address fields

checkoutmagento

How can I get the choosen shipping and billing fields during checkout? (I want to show them in sidebars)

I use this in shipping.phtml but ofcourse that's just for the current 'address' (and I want to use it in methods.phtml and other pages)

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

So I assumed that this would work out…

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

But it didn't, anybody has a tip?

Addition:
This one was helping me a lot, but I'm stuck :-S
How do I get the shipping method the user has chosen during checkout?

Best Answer

Shipping and billing addresses are children of quote object. So something like this shall work:

Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getFirstname();
Related Topic