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

OpenCart 2

A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.

This is integration method for open source shopping cart OpenCart. The integration is done by integrating files of thank you page.

You can track per product orders, lifetime commissions and also coupons.

Edit confirm action

Navigate to your cart directory catalog/controller/checkout and open confirm.php for editing. Find this line:

$data['totals'] = array();

Put this code below that line:

$this->session->data['totals'] = $order_data['totals'];
$this->session->data['pap4_products'] = $data['products'];

Save these files and continue with next step.

Edit success action

Open file catalog/controller/checkout/success.php and find this line (first occurrence):

if ($this->customer->isLogged()) {

Place the following code above that line:

$data['pap4_orderid'] = $this->session->data['order_id'];
$data['pap4_totals'] = $this->session->data['totals'];
$data['pap4_products'] = $this->session->data['pap4_products'];
if ($this->customer->isLogged()) {
  $data['pap4_email'] = $this->customer->getEmail();
}
else {
  $data['pap4_email'] = $this->session->data['guest']['email'];
}
unset($this->session->data['pap4_products']);

Again, do not forget to save the changes and continue to the next integration step.

Whole cart as one transaction – Edit success view

If you want to process the whole payment as one transaction in PAP, follow this step. If you want to create one transaction for every product, continue to step 4.

Open file catalog/view/theme/default/template/common/success.tpl.

Add these lines before the last line which says ‘echo $footer;‘:

<?php
if(isset($pap4_totals) && isset($pap4_orderid) && isset($pap4_email)) {
  $subtotal = 0;
  foreach ($pap4_totals as $item) {
    if ($item['code'] == 'sub_total') {$subtotal += $item['value'];}
    if ($item['code'] == 'coupon') {$subtotal += $item['value'];}
    if ($item['code'] == 'voucher') {$subtotal += $item['value'];}
  }
  if ($subtotal < 0) {$subtotal = 0;}
  ?>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
  PostAffTracker.setAccountId('default1');
var sale = PostAffTracker.createSale();
  sale.setTotalCost('<?php echo $subtotal; ?>');
  sale.setOrderID('<?php echo $pap4_orderid; ?>');
  sale.setData1('<?php echo $pap4_email; ?>');
  PostAffTracker.register();
</script>
<?php } ?>

Save the file and your shop is integrated.

Note: The values of ‘Coupon‘ and ‘Voucher‘ are negative, that is why we are directly adding it to the subtotal value.

One transaction per product – Edit success view

This step is not necessary if you already used step 3.

Open file catalog/view/theme/default/template/common/success.tpl.

Add these lines before the last line which says ‘echo $footer;’:

<?php
if (isset($pap4_totals) && isset($pap4_orderid) && isset($pap4_email)) {
?>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">

  <?php
    $i = 0;
    foreach ($pap4_products as $item) {
      echo "var sale$i = PostAffTracker.createSale();";
      echo "sale".$i.".setTotalCost('".$item['total']."');";
      echo "sale".$i.".setProductID('".$item['product_id']."');";
      echo "sale".$i.".setOrderID('".$pap4_orderid."(".$i.")');";
      echo "sale".$i.".setData1('".$pap4_email."');";
      $i++;
    }
  ?>
  PostAffTracker.register();
</script>
<?php
}
?>

This will register a commission per each ordered product.

Do not forget to integrate your cart with the click tracking to make the sale tracking work. You can place the click tracking code to the theme footer file:
catalog/view/theme/YOUR_THEME/template/common/footer.tpl

Back to Integrations Create account for FREE
Would you like to improve your affiliate software even more? Check out the Paymate Express integration for Post Affiliate Pro.

Paymate Express

PostAffiliate Pro offers Paymate integration for secure online and mobile payments. The process includes updating Paymate button code and adding integration code to your processing script.

Would you like to improve your affiliate software even more? Check out the Instamojo integration for Post Affiliate Pro.

Instamojo

The article discusses the integration of Simple PayPal Shopping Cart plugin with the Post Affiliate Pro platform, allowing users to sell products and services directly from their WordPress site. Instructions are provided for editing code and configuring settings for the integration.

Would you like to improve your affiliate software even more? Check out the WebMoney Merchant Service integration for Post Affiliate Pro.

WebMoney Merchant Service

The given text provides information about integrating WebMoney Merchant Service with Post Affiliate Pro, including code examples and related articles.

Would you like to improve your affiliate software even more? Check out the OpenCart 3 integration for Post Affiliate Pro.

OpenCart 3

This text provides instructions on how to integrate a shopping cart system, OpenCart 3, with the Post Affiliate Pro tracking code for commission tracking on sales.

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