Question

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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top