Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top