Magento Forum

   
How do I get the subtotal value in a $var
 
jonathb
Jr. Member
 
Total Posts:  10
Joined:  2008-09-22
 

Hye All,
Here is my problem.

I would like to to install a tracker in the : /magento/app/design/frontend/default/blank/template/checkout/success.phtml file.

Here is the tracker :

<img src="http://affiliation./affilie.php?idb=XXXXX&numcom;=XXXX&montant;=MySubtotalValue" border="0" />

So i need to set MySubtotalValue (without tax and delivery) in this img tag as 35.28 for example

Does anyone have the solution ?

Thanks !

 
Magento Community Magento Community
Magento Community
Magento Community
 
jonathb
Jr. Member
 
Total Posts:  10
Joined:  2008-09-22
 

Here is the answer :

<?php
$_customerId 
Mage::getSingleton('customer/session')->getCustomerId();
$lastOrderId Mage::getSingleton('checkout/session')->getLastOrderId();
$order Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_sub $_totalData['subtotal'];
?>
<img src="https://shareasale.com/sale.cfm?tracking=<?php echo $this->getOrderId() ?>&amount;=<?php echo $_sub ?>&transtype;=sale&merchantID;=XXXX" width="1" height="1">

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top