Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Checkout problem: review template shows not current current billing address
 
Star Solutions
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2009-02-24
Nuremberg, Germany
 

Hi, I want to show the customer’s billing address on the review step of the checkout process. Therefore I’ve added following code to the review.phtml for testing:

$checkout Mage::getSingleton('checkout/session')->getQuote();
$billing $checkout->getBillingAddress();
echo 
$billing->getName() . $billing->getStreet(1) . $billing->getPostcode() . $billing->getCity() . $billing->getCountry();

Unfortunately, this method shows always the previous address. E.g. the first time it shows nothing. When the checkout process page is completely reloaded before the order is placed, it shows the billing address. However, when the billing address is changed it still shows the old billing address until the page is completely reloaded. Where is my mistake?
Thx.

 
Magento Community Magento Community
Magento Community
Magento Community
 
marito
Jr. Member
 
Total Posts:  14
Joined:  2008-09-02
 

Hi there,
did you find an answer oder did anyone else know it? I need this feature too,
Thanx
Marito

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yireo
Member
 
Avatar
Total Posts:  52
Joined:  2008-05-26
The Netherland
 

Hi,

I took the time to dive into this a bit. The problem is that the checkout-page is not refreshed during the checkout - only through AJAX certain parts of the page are refreshed. By adding the code mentioned in this thread, the HTML (printing the billing address) is inserted as soon as the page loads.

But once the first steps of the checkout are passed, the billing address might change, but the HTML does not. In other words, the AJAX procedure would need adjustment to insert the right address details as soon as the billing address is changed in the session.

This requires a modification of JavaScript, which is largely based on the script opcheckout.js. I imagined that it is possible to add your own extra requirements, without actually touching the original JavaScript. But it’s definitely a lot harder than just adding a few lines of code.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top