–Hidden comment

Use attributes in format region_from and region_to= to change the languages showing in language switcher.
Available regions are:
europe_from europe_to
asia_from asia_to
mideast_from mideast_to
america_from america_to

europe_from=0 europe_to=22 will put all languages (ordered in language switcher settings) from 1 to 21 to Europe region:
asia_from=22 asia_to=25 will put all languages from 23 to 24 (so only 2) into Asia region.


1st class all in one hosted shopping cart for your online ecommerce store with FTP access, shared SSL and legendary support.

Sale tracking

Open file packages/core_commerce/single_pages/checkout/finish.php and find this line:

if($previousOrder instanceof CoreCommercePreviousOrder && $previousOrder->getStatus() > 0) { ?>

Add the sale tracking code below the line:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
var sale = PostAffTracker.createSale();
sale.setTotalCost('<?php echo $previousOrder->getOrderTotal(); ?>');
sale.setOrderID('<?php echo $previousOrder->getOrderID(); ?>');

Save your changes and that’s it. Your thank you page has just been integrated. If you want per product integration, please use the sale tracking code from the next step.

Per product integration

The sale tracking code for per product integration is this, place it to the file described in previous step:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
$i = 1;
foreach($previousOrder->getProducts() as $product) {
echo "var sale$i = PostAffTracker.createSale();";
echo "sale$i.setTotalCost('".$product->getOrderProductFinalPrice."');";
echo "sale$i.setOrderID('".$previousOrder->getOrderID()."(".$i.")');";
echo "sale$i.setProductID('".$product->getProductID()."');";

Save your changes and that’s it. Your site has just been integrated.

PayPal with CoreCommerce 1

In case you are using PayPal as your payment gateway in CoreCommerce and you want to track it, use this integration step.

The first step is to add the tracking code to all buttons generated by CoreCommerce. To do this, edit this file:


Add this code after the “foreach” loop:

<input type="hidden" name="custom" value="" id="pap_dx8vc2s5" />
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">

Save your changes.

PayPal with CoreCommerce 2

Now edit file controller.php (in the same directory) and find this line:

private function validateIPN() {

Add this code right below the line:

// Post Affiliate Pro integration snippet
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
// /Post Affiliate Pro integration snippet

Save your changes. The last step is to turn on PayPal plugin in your merchant panel and configure it. That is it… Now all your payments done through PayPal will be tracked, as well as its cancellations or refunds.

HOSTED version of CoreCommerce

If you happen to have a hosted solution of CoreCommerce then the sale tracking code integration happens inside the CoreCommerce admin panel.
To integrate it this way, in CoreCommerce admin panel click ‘Settings‘ in the top right corner. At the settings page click ‘Affiliate settings‘. In this Affiliate settings page you will find a field called ‘Custom Affiliate Program Code‘ where you can place the hidden image (pixel) tracking code:

<img src="https://URL_TO_PostAffiliatePro/scripts/sale.php?AccountId=default1&TotalCost=##TOTAL_B4_TAX_SHIPPING##&OrderID=##ORDER_NUMBER##" width="1" height="1" />

Save your custom code and that’s it.

Do not forget to add the click tracking code to your theme files (header or footer).

Back to Integrations Create account for FREE

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.


Schedule a one-on-one call and discover how Post Affiliate Pro can benefit your business.

We’re available on multiple dates

Schedule a call