Show order summary inside magento success page
Posted by navaneeth on Jun 11, 2013 in Magento, Php | No comments yet
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