Reputation:
I want to display to user the address, that will be used for billing, in the last step of One Page Checkout in Magento. I tried the following method in file review\info.phtml
:
Mage::getSingleton('checkout/session')->getQuote()
->getShippingAddress()
->getData();
But when I go to the review order step, I am redirected to shopping cart page. Maybe I need to insert the code in other file?
Upvotes: 2
Views: 7857
Reputation: 5348
I had once the same problem. Try this:
<?php
$checkout = Mage::getSingleton('checkout/session')->getQuote();
$billAddress = $checkout->getBillingAddress();
print_r($billAddress->getData());
?>
P.S. You are trying to get shipping address when you want billing.
Upvotes: 5