2

I wanna customize the success page because is very poor of information, so I would like to bring on page the order status, ordered items table, shipping address and shipping method details, like here: http://www.magentocommerce.com/magento-connect/media/catalog/product/cache/9/image/725x680/9df78eab33525d08d6e5fb8d27136e95/f/r/fr_1.png

Additionally, I've heard that some things changed on the magento 1.9 core, so, how to break session in order to edit CSS and refresh the page without redirects?

Can someone help me?

1

I believe something like this would give you all the details you need for adding order details to success.pthml:

// Load order details
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$orderDetails = Mage::getModel('sales/order')->loadByIncrementId($orderId);
zend_debug::dump($orderDetails);

Edit from comment, for success.pthml:

<?php
//**********************************Order Details***************************
if($this->getOrderId()):
//echo $this->getOrderId();
//$orderObj = Mage::getModel(‘sales/order’)->loadByIncrementId($this->getOrderId());
$orderItems = $orderObj->getAllVisibleItems();
?>
<div><table >
<thead>
<th>Product Name</th>
<th>Unit Price</th>
<th>Qty</th>
<th>Subtotal</th>
</thead>
<tbody>
<?
$_product = Mage::getModel(‘catalog/product’)->load($items->getProductId());
foreach($orderItems as $items){
$product_small_image_path = Mage::helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(135);
?>
<tr>
<td><span><img src=”<?php echo $product_small_image_path ?>”/></span><? echo $items->getName();?></td>
<?php ?><td><? echo number_format($items->getPrice(),3);?></td><?php
?><td><? echo $items->getQtyOrdered(); ?></td><?php
$totalprice = ($items->getQtyOrdered())*($items->getPrice());
?><td><? echo number_format($totalprice,3); ?></td></tr><?php
}
?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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