I am using Mangento Go and after a sale has taken place on the confirmation page I am using a JS code that needs the value of the sale in a variable like $totalvalue.

I am unable to find something in the templates to grab that value and put it into a variable. ANy ideas on how I can do this? I am new to Magento so very lost. Please let me know if there is a way. Thanks!

I found this page: http://go.magento.com/support/kb/entry/name/defining-transactional-variables/

But they are referring to transactional emails but i need this on the sales confirmation page.

  • 4
    This question appears to be off-topic because it is about Magento Go which will be shut down soon. – Anna Völkl Nov 13 '14 at 13:03

The order is not available on the success page. What you can do (at least in CE) is to load it:

$order = Mage::getModel('sales/order')->load($this->getOrderId());

then you can get the value via

$order->getBaseGrandTotal();  /* or */  $order->getGrandTotal();

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