Sometimes we need to show order summary inside magento success page
Copy this snippet of code inside template/checkout/success.phtml

<?php
    $_customerId = Mage::getSingleton('customer/session')->getCustomerId();
    $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
    $order = Mage::getSingleton('sales/order'); 
    $order->load($lastOrderId);
    $_totalData =$order->getData(); 
    $_sub = $_totalData['subtotal'];
    //get order details
    //print_r($_totalData);
    $_order   = $this->getOrder();
    $allitems = $order->getAllItems();
    foreach($allitems as $item)
    {
    //get items in cart
    // print_r($item)
    }
?>

Hope you will get how to show order summary inside magento success page

Leave a Reply

Your email address will not be published.