Magento success.phtml
/httpdocs/app/design/frontend/default/hellopress/template/checkout
<!-- Getprice.com.au sales tracking system --> <img height="1" width="1" border="0"src="https://secure.getprice.com.au/affsale.asp?shopid=1802&sid=<?php echo $this->getOrderId()?>"> <!-- End Getprice.com.au -->
I need find the Order Price method.
Magento is a very huge system and it’s very hard to find the method of the object.
<!--MyShopping.com.au Code for Purchase Conversion Page --> <img height=0 width=0 src="https://www.myshopping.com.au/sale.asp?mid=2688&order=<?php echo $this->getOrderId()?>">
hi wats your myspace page
Hi Did you ever close this out? Im trying to add the tracking code to our website http://www.sparesplanet.com.au and struggling a little.
Hi, have you found a solution?
Don’t see any posted, so this is what I found/did.
I only did this yesterday to test my tracking stats with getprice.
Ideally this should be done in a module. (no time right now)
Firstly, it would seem that in the success page, the actual order/quote data is not actually available, so we need to push that onto the page block
This is done in Mage_Checkout_Block_Onepage_Success
The original:
/**
* Get last order ID from session, fetch it and check whether it can be viewed, printed etc
*/
protected function _prepareLastOrder()
{
$orderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId();
if ($orderId) {
$order = Mage::getModel(‘sales/order’)->load($orderId);
if ($order->getId()) {
$isVisible = !in_array($order->getState(),
Mage::getSingleton(‘sales/order_config’)->getInvisibleOnFrontStates());
$this->addData(array(
‘is_order_visible’ => $isVisible,
‘view_order_id’ => $this->getUrl(‘sales/order/view/’, array(‘order_id’ => $orderId)),
‘print_url’ => $this->getUrl(‘sales/order/print’, array(‘order_id’=> $orderId)),
‘can_print_order’ => $isVisible,
‘can_view_order’ => Mage::getSingleton(‘customer/session’)->isLoggedIn() && $isVisible,
‘order_id’ => $order->getIncrementId(),
));
}
}
}
and my change, making the whole order and quote objects data available to sussess page:
/**
* Get last order ID from session, fetch it and check whether it can be viewed, printed etc
*/
protected function _prepareLastOrder()
{
$orderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId();
if ($orderId) {
$order = Mage::getModel(‘sales/order’)->load($orderId);
if ($order->getId()) {
$isVisible = !in_array($order->getState(),
Mage::getSingleton(‘sales/order_config’)->getInvisibleOnFrontStates());
$quote = mage::getModel(‘sales/quote’)->load($order->getQuoteId());
$this->addData(array(
‘is_order_visible’ => $isVisible,
‘view_order_id’ => $this->getUrl(‘sales/order/view/’, array(‘order_id’ => $orderId)),
‘print_url’ => $this->getUrl(‘sales/order/print’, array(‘order_id’=> $orderId)),
‘can_print_order’ => $isVisible,
‘can_view_order’ => Mage::getSingleton(‘customer/session’)->isLoggedIn() && $isVisible,
‘order_id’ => $order->getIncrementId(),
‘order_object’ => $order,
‘quote_object’ => $quote,
));
}
}
}
thus in template you can use : $this->getOrderObject()->getGrandTotal() as one example.
Hope this helps