I need some basic information on my Magento checkout success page to check some conversions through my shop. For that I need the total price of the order and all article IDs.
While searching I found a code to get the last order:
<?php
$_customerId = Mage::getSingleton('customer/session')->getCustomerId();
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
?>
But how can I get the total price and all article IDs (seperated by ,).
I’m quiet new to Magento, so everything is a bit confusing to me.
Can somebody help me?
Thank you.
Greetings from Germany,
Raisis
You can get order total by
$order->getData('base_grand_total');in order to get all articles (loop through) you need to do,