–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.


An open source ecommerce software that helps to create a successful online stores for free.

Fast, efficient and easy to use, PrestaShop’s free e-commerce solution provides everything you need to open, operate and maintain a successful online store.

Integration using PrestaShop module

The easiest way to integrate PrestaShop with Post Affiliate Pro (Network) is to use our integration module (free downloadable module by Quality Unit, version 3.20.3)

It is a standard PrestaShop module which you can install as any other module. Configure it after installation and integration is done. The plugin automatically integrates all the needed integration codes.


  • If you are using performance setting “Move JavaScript to the end” in your PrestaShop, please turn it off as it breaks down the tracking functionality.
  • The module is currently tested with PrestaShop version The module might very well work with newer versions as well, we just didn’t test it or we simply haven’t updated this note yet.

Localization of file and add tracking code (older versions of PrestaShop)

Connect to your FTP and find the file order-confirmation.php . This file process orders. Download it, open it in any text editor and find this line:

'HOOK_PAYMENT_RETURN' => Hook::paymentReturn(intval($id_order), intval($id_module))));

Add this tracking code after the line mentioned above. The code is for tracking total cost and order ID:

?><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 $order->total_paid_real; ?>');
sale.setOrderID('<?php echo $id_order; ?>');


Now save the file and upload it back to FTP.

PayPal part 2

Next thing to do is to find file validation.php, also inside shop/modules/paypal/. Edit this file and find this line of code:

$ch = curl_init('https://' . $paypalServer . '/cgi-bin/webscr');

Put following code right after that line of code:

/* PAP4 integration */
 $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);
/* end of PAP4 integration */

Also, you have to activate PayPal IPN plugin inside of your Merchant panel > Plugins. Edit the plugin settings and change separator to ||.

PayPal part 3

Last thing to do is to find this line of code inside validation.php:

if ($result == 'VERIFIED') {

Put following code right after that line of code:

$separator = '||';
    if ($_POST['custom'] != '') {
      $explodedCustomValue = explode($separator, $_POST['custom'], 2);
          if (count($explodedCustomValue) == 2) {
            $_REQUEST['custom'] = $_POST['custom'] = $explodedCustomValue[0];

That’s all necessary in order to integrate PrestaShop + PayPal.

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