1

We want to display the shipping and billing address and payment method details on the review page of the one page checkout. We use persistent checkout for this. I just want to show a summery of details what the user's selected or entered.

We currently have this:

Billing address:

<address><?php echo $this->getQuote()->getBillingAddress()->format('html') ?></address>

Shipping address:

<?php if(!$this->getQuote()->isVirtual()): ?>
<address><?php echo $this->getQuote()->getShippingAddress()->format('html') ?></address>

But this does only work if you refresh the page. The details do not load directly the first time. And I do not know how to display the payment method.

I'm also looking for the code to display the payment method.

Can anyone help me to display this instant on the review page?

4
  • Isn't this information on the standard Magento checkout sidebar? Did you remove that sidebar? Can you post screenshots of what you are seeing?
    – kab8609
    Commented Dec 9, 2014 at 19:50
  • Sidebar is still available and also working. We want to keep this sidebar on every step, but we do want a summery on the review page on a more prominent place. That why we want to display these details on the review page. But we don't want to lose the sidebar
    – JGeer
    Commented Dec 9, 2014 at 20:20
  • What phtml file are you putting your code into?
    – kab8609
    Commented Dec 9, 2014 at 20:27
  • We used this file template/checkout/onepage/review.phtml
    – JGeer
    Commented Dec 9, 2014 at 20:30

1 Answer 1

1

I used this to show the information about the payment

$payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle();

This show me the title of the payment method. I don't know if is enough for what you want

12
  • I tried this, but it did not work. '<address><?php $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle();?></address> '
    – JGeer
    Commented Dec 10, 2014 at 7:55
  • Can you do this separate? Like this <?php $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle(); ?> <address><?php echo $payment; ?></address> . I don't know why but it matters
    – Natalie
    Commented Dec 10, 2014 at 15:36
  • Tried that, but that brake down the checkout. :(
    – JGeer
    Commented Dec 10, 2014 at 17:07
  • Is in the review in info.phtml, right?
    – Natalie
    Commented Dec 10, 2014 at 21:50
  • Yes, info.phtml is the default Magento file. We did not change that. I only placed the code in review.phtml were we need it.
    – JGeer
    Commented Dec 11, 2014 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.