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

Summer Cart

An easy-to-use full-featured PHP shopping cart.

Summer Cart has all the tools and features to enable online merchants easily build a working store from top to bottom. Whether you sell a dozen of niche specialties, or list hundreds of mass products, you will get high visibility and popularity of your operation through a masterly crafted store.

Integration of Post Affiliate Pro with Summer Cart will require to modify not just footer of your shop (to add click tracking code), but also 2 shopping cart classes. See details of this integration below.

Click integration

Click tracking code should be stored into file skins//customer/footer.tmpl.

If you don’t have this file in your skin, just copy it from skeleton directory to your theme directory and add click tracking code, which is prepared for you in Post Affiliate Pro (menu Tools -> Integration -> Click tracking)

Add this code before </body> tag in your footer.tmpl template.

Sale Integration

Sale integration will work in 2 steps and integration is done by calling PAP API requests to Post Affiliate Pro directly from php code of your shopping cart.

In first step will be created transaction in Post Affiliate Pro (status Pending) and later, when order will be delivered to your customer, transaction in Post Affiliate Pro will change status to Approved.

Add transaction step

Your shopping cart will create order in time, when is visitor redirected to payment processor (e.g. Paypal). In same time is created transaction in Post Affiliate Pro (status Pending)

Open the shopping cart file: /include/sc/util/order/OrdersInProgress.php

so that we can place there the sale tracking code right at the end of class scOrdersInProgress .

In order to track the entire order as 1 transaction (commission) in Post Affiliate Pro (even if multiple items are purchased during the particular order) use the following code:

private function registerNewPostAffiliateProTransaction($order) {
    include_once('<PATH_TO_PAP_API>/PapApi.class.php');
    $saleTracker = new Pap_Api_SaleTracker('https://URL_TO_PostAffiliatePro/scripts/sale.php');

    $productIDs = '';
    $items = $order->getOrderItems();
    foreach($items as $item) {
       $productIDs .= $item->get('OrderItemProductCode').',';
    }

    $sale = $saleTracker->createSale();
    $papOrderDetails = $order->getOrderTotalLines();
    $sale->setTotalCost($papOrderDetails[0]->get('OrderTotalLineCustomerCurrencyAmount'));
    $sale->setOrderID($order->getPK());
    $sale->setProductID($productIDs);
 
    $saleTracker->register();
}

If you wish each item purchased during the order to be tracked as a separate transaction (commission) in Post Affiliate Pro, then use the following code:

private function registerNewPostAffiliateProTransaction($order) {
    include_once('<PATH_TO_PAP_API>/PapApi.class.php');
    $saleTracker = new Pap_Api_SaleTracker('https://URL_TO_PostAffiliatePro/scripts/sale.php');
      $items = $order->getOrderItems();
      foreach($items as $item) {
          $sale = $saleTracker->createSale();
          $sale->setTotalCost($item->get('OrderItemTotal'));
          $sale->setOrderID($order->getPK());
          $sale->setProductID($item->get('OrderItemProductCode'));
      }
      $saleTracker->register();
    }

IMPORTANT: this method should be stored before end of class, it means before last } in file /include/sc/util/order/OrdersInProgress.php

IMPORTANT: Don’t forget to replace with correct path to PapApi.class.php file.

PapApi.class.php file can be downloaded from your Post Affiliate Pro installation in menu Tools-> Integration -> Api Integration.

Copy it to your server, where is installed your shop and set the correct path on place of .

Add transaction step

Now we should use the method registerNewPostAffiliateProTransaction, which we added in previous step.

Please add following line of code into method createOrder right before last line

return $this->_lastOrderId;
$this->registerNewPostAffiliateProTransaction($order);

Change status of transaction

Status of existing transactions in Post Affiliate Pro can be controlled by changing of status in your shopping cart.

Following code will change status of PAP transaction to Approved, if you will set your shopping cart order to status Delivered.

And it will set PAP transaction to status Declined, if you will set your shopping cart order to status Cancelled, Failed Or Returned.

Edit your shopping cart file /include/sc/domainobj/Order.php and at the end of class Order add following method:

    private function updatePostAffiliateProTransaction() {
      try {
  		  include_once('<PATH_TO_PAP_API>/PapApi.class.php');
        $session = new Gpf_Api_Session("https://URL_TO_PostAffiliatePro/scripts/server.php");

        if(!$session->login("<MERCHANT_USERNAME>","<MERCHANT_PASSWORD>")) {
          return false;
        }


        $request = new Pap_Api_TransactionsGrid($session);
        $request->addFilter("orderid", Gpf_Data_Filter::LIKE, $this->getPK());
        $request->addFilter("rtype", Gpf_Data_Filter::EQUALS, 'S');
        try {
        	$request->sendNow();
        	$grid = $request->getGrid();
        	$recordset = $grid->getRecordset();
        } catch (Exception $e) {
          return false;
        }

        foreach($recordset as $rec) {
          $transaction = new Pap_Api_Transaction($session);
          $transaction->setTransid($rec->get('transid'));
          try {
        	  if(!$transaction->load()) {
        	   return false;
        	  } else {
        	     if ($transaction->getStatus() != 'D') {
                  $newStatus = '';
                  switch($this->get('OrderStatus')) {
                    case scOrderStatus::ORDER_STATUS_UNFINISHED:
              		  case scOrderStatus::ORDER_STATUS_PAYMENT_PENDING:
              		  case scOrderStatus::ORDER_STATUS_NEW:
              		  case scOrderStatus::ORDER_STATUS_IN_PROGRESS:
              		  case scOrderStatus::ORDER_STATUS_ON_HOLD:
              		  case scOrderStatus::ORDER_STATUS_QUEUED:
              		    $newStatus = 'P';
              		    break;
              		  case scOrderStatus::ORDER_STATUS_RETURNED:
              	    case scOrderStatus::ORDER_STATUS_PAYMENT_FAILED:
              		  case scOrderStatus::ORDER_STATUS_CANCELLED:
              		    $newStatus = 'D';
              		    break;
              		  case scOrderStatus::ORDER_STATUS_DELIVERED:
              		    $newStatus = 'A';
              		    break;
            		  default:
            		    return false;
                  }
                  // changing the status of a transaction
                  if (strlen($newStatus) && $transaction->getStatus() != $newStatus) {
                    $transaction->setStatus($newStatus);
                    $transaction->save();
                  }
               }
        	  }
          } catch (Exception $e) {
            return false;
          }
        }
        } catch (Exception $e) {
          return false;
        }
        return true;
    }

IMPORTANT: this method should be stored before end of class, it means before last } in file /include/sc/domainobj/Order.php

IMPORTANT: Don’t forget to replace with correct path to PapApi.class.php file.
PapApi.class.php file can be downloaded from your Post Affiliate Pro installation in menu Tools-> Integration -> Api Integration.

Copy it to your server, where is installed your shop and set the correct path on place of .

IMPORTANT: On place of use your merchant username and on place of use your password. API request will use your user credentials to access transactions in your Post Affiliate Pro installation.

Change status of transaction

Now we should use the method, which we added to class Order.

Add the following line of code (found in the box below) into file /include/sc/domainobj/Order.php to the very end of the updateOrderStatus and setOrderStatus methods.

$this->updatePostAffiliateProTransaction();

Custom Order Statuses

In case you plan to use custom order statuses in your Summer Cart, you should adapt method updatePostAffiliateProTransaction in your shopping cart file /include/sc/domainobj/Order.php.

in switch function you should add new case statements, where value will be ID of your custom status.

Back to Integrations Create account for FREE
Blog - Post Affiliate Pro Versions 5 11 29 2 And 5 11 29 1

Blog - Post Affiliate Pro Versions 5 11 29 2 And 5 11 29 1

The given text discusses the company's profile and its various programs such as Affiliate Marketing Academy and Affiliate Program Directory. It also talks about the latest updates and bug fixes made in the Post Affiliate Pro software, including password security improvements, a new option not to save a commission, and optimized performance. The updates also address several issues related to affiliate channel management, coupon assignment, and user experience. The text concludes with a recommendation to try Post Affiliate Pro as an ideal solution for affiliate marketing.

Integration Methods - S2member Wordpress Membership Module

Integration Methods - S2member Wordpress Membership Module

The article discusses the integration of various software with PostAffiliate Pro, including a detailed guide on integrating Foxy Cart and aMember. It also provides step-by-step instructions for each integration and encourages readers to create a free account on PostAffiliate Pro. The text also includes information about the company, its awards, and customer reviews. Finally, it offers a one-on-one consultation to help businesses understand how PostAffiliate Pro can benefit them.

Post Affiliate Pro is committed to privacy, security, compliance, and transparency. It is fully compliant with the GDPR regulation.

GDPR

Post Affiliate Pro is fully compliant with GDPR regulations, ensuring privacy, security, and transparency for customers. The General Data Protection Regulation strengthens and unifies data protection for all individuals within the European Union. Post Affiliate Pro's internal team and dedicated Data Protection Officer ensure compliance with the regulation, with sensitive information securely stored and limited access. Customer data is stored in European datacenters located in Germany, UK, and Slovakia, and hosted by Linode, Inc. The platform provides additional security measures such as two-factor authentication and HTTPS encryption, and features to assist with GDPR compliance. Customers have full control over their accounts and can request deletion at any time.

Wondering how much to pay you affiliates? Find out more about the affiliate methods and commissions, and choose your preferred one.

Affiliate payments 101

The article discusses various affiliate programs, including HerAgency, Infolinks, and LinkConnector, and offers tips on building an effective affiliate marketing funnel. It also presents a list of the top 50 resources on affiliate marketing and mentions a new update for Post Affiliate Pro. The article provides related resources and tips for improving affiliate websites and includes sales contacts for the company.

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