Language switcher

#languages]

–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

Example:
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.

Integrations

Maximize the value of your existing affiliate marketing software and extend its possibilities with a wide range of integrations, plugins and apps. All built to improve the strong foundations of Post Affiliate Pro.

J2Store (Joomla! Extension)

A shopping cart and e-commerce extension that extends articles as products and lets you to turn articles into full fledged products.

Offline sale

Open file:

plugins/j2store/payment_offline/payment_offline.php

and find function _postPayment and this line within it:

if ($orderpayment->save()) {

Add this code right above the line:

$vars->order_id = $orderpayment->order_id;
$vars->total_cost = $orderpayment->order_subtotal;

Save your work. Now open file:

plugins/j2store/payment_offline/payment_offline/tmpl/postpayment.php 

and add this code to the end of the file:

{$TrackingScript}
 <script type="text/javascript">
  {$SetAccountJs}
  var sale = PostAffTracker.createSale();
  sale.setTotalCost('<?php echo $vars->total_cost; ?>');
  sale.setOrderID('<?php echo $vars->order_id; ?>');
  sale.setStatus('P');

  PostAffTracker.register();
  </script>

Save your work. This will create a pending commission for each offline transaction. You will have to approve or decline it manually later – based on the original transaction.

PayPal – step 1

Find file:

plugins/j2store/payment_paypal/payment_paypal/tmpl/prepayment.php

and find the notify_url input field. It looks something like this:

<input type="hidden" name="notify_url" value="<?php echo JRoute::_( $vars->notify_url ); ?>" />

and into that field add:

id='pap_ab78y5t4a'

The updated field is supposed to look like this:

<input id='pap_ab78y5t4a' type="hidden" name="notify_url" value="<?php echo JRoute::_( $vars->notify_url ); ?>" />

Right under that notify_url input field (so right under that line of code) place this code below:

<!-- {$PapFullname} Integration snippet -->
{$TrackingScript}
<script type="text/javascript">
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a', '', 'pap_custom');
</script>
<!-- /{$PapFullname} Integration snippet -->

PayPal – step 2

Open file:

plugins/j2store/payment_paypal/payment_paypal.php

and find function _process() and this line within it:

$data = $app->input->getArray($_POST);

Now add this code below right above that line:

 /* {$PapFullname} integration snippet */
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "{$HttpProtocol}{$PluginsUrl}PayPal/paypal.php?pap_custom=".@$_GET['pap_custom']);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
    curl_exec($ch);
  /* /{$PapFullname} integration snippet */

Do not forget to integrate you Joomla with the click tracking code and to activate the PayPal IPN Handling plugin in your installation of Post Affiliate Pro.

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