1

I need to add some tracking code on success.phtml like this:

<img src="https://tracking.tracking.com/lead.php?idClient=12345678&idGroup=12345678&price=I_CANNOT_GET_THIS&idCommande=<?php echo $this->getOrderId(); ?>" alt="" border=“0” /> 

You will see that I need to find:

&price=THE PRICE OF THE ENTIRE SUCCESSFUL CART 

I cannot work out how to get this.

Any help would be very appreciated...

2 Answers 2

1

On the success page you can get the last order id with the following snippet.

$orderId = Mage::getSingleton('checkout/session')->getLastOrderId(); 

You can then simply load the order from this id.

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

And then get the grand total for your conversion.

$order->getBaseGrandTotal(); 
0

I think you are looking for getGrandTotal. You can try load($this->getOrderId())->getGrandTotal(); ?>

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.