2

I am looking to integrate a tracking code onto the Magento checkout success page from a company called Paid On Results.

I've been trying to make the snippet of code from the following two pages: http://www.paidonresults.com/integration/advance-tracking.html

And: http://www.magebuzz.com/blog/implement-paidonresults-affiliate-tracking-code-for-magento/

I see that I add the code from the second page so that I can then put the information into the URL in the following bit of code:

<script language=JavaScript src="https://secure.paidonresults.net/create-sale?client=java&MerchantID=000&SaleID=Your-Sale-ID&Purchases=Your-Purchases"></script>
<noscript><img src="https://secure.paidonresults.net/create-sale?client=img&MerchantID=000&SaleID=Your-Sale-ID&Purchases=Your-Purchases" width="10" height="10" border="0"></noscript>

So I know the merchant ID but as for the Sale ID and Purchases I'm not sure how to get these into the URL.

Any help is greatly appreciated.

  • page is located at app/design/frontent/YOUR PACKAGE/YOUR TEMPLATE/tamplate/checkout/success.phtml....getOrder id from $this->getOrderId().... – Amit Bera Feb 11 '15 at 12:08
4

Edit the success.phtml template and add the code from the blog post above (in <?php ?> tags), to insert the required variables use:

<script language="javascript" src="https://secure.paidonresults.net/create-sale?client=java&MerchantID=000&SaleID=<?php echo $order->getIncrementId() ?>&Purchases=<?php echo $purchases ?>"></script>

Also it's not really required to load the product you can use $item->getPrice() and $item->getSku() where needed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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