Want more features on Pastebin? Sign Up, it's FREE!
Guest

Bruno Alexandre

By: a guest on Jul 6th, 2010  |  syntax: PHP  |  size: 1.74 KB  |  views: 254  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!--
  2.      This file is part of the Magento Article, How to Add Tracking Links to Magento
  3.      Please change add the code to the end of the file, changing it to your own needs
  4. -->
  5.  
  6. <?php
  7.         /* ***********************************************************************************************
  8.  
  9.         SALE link that AdServer wants to be displayed in the page (my Example Euroads.dk):
  10.         <iframe src="http://www.euroads.dk/system/showtrackingpixels.php?cpid=2125&sid=1&orderid=%orderid%&orderamount=xxxx.xx&currencysymbol=%currencysymbol%&pgid=95" width=1 height=1 marginwidth=0 marginheight=0 ALLOWTRANSPARENCY="true" frameborder=0 scrolling=no hspace=0 vspace=0></iframe>
  11.  
  12.         *********************************************************************************************** */
  13.  
  14.         $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
  15.         $_neworder = Mage::getSingleton('sales/order')->load($lastOrderId);
  16.        
  17.         $_timestamp = time();
  18.         $_euroads_orderId = $this->getOrderId();
  19.         $_euroads_paymentMethod = $_neworder->getPayment()->getMethod();
  20.         $_euroads_orderTotal = $_neworder->getGrandTotal();
  21.         $_euroads_currencySymbol = $_neworder->getOrderCurrency();
  22.        
  23.         /*
  24.         echo "<hr/>";
  25.         echo "OrderID: ".$this->getOrderId()."<br/>";
  26.         echo "Payment Method: ".$_neworder->getPayment()->getMethod()."<br/>";
  27.         echo "Total Amount: ".$_neworder->getGrandTotal()."<br/>";
  28.         */
  29. ?>     
  30. <!-- Euroads tracking code for Sale -->
  31. <iframe src="http://www.euroads.dk/system/showtrackingpixels.php?cpid=2125&sid=1&orderid=<?php echo $_euroads_orderId; ?>&orderamount=<?php echo $_euroads_orderTotal; ?>&currencysymbol=<?php echo $_euroads_currencySymbol; ?>&pgid=95" width="1" height="1" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" hspace="0" vspace="0"></iframe>
clone this paste RAW Paste Data