Summer Cart

Summer Cart is a PHP shopping cart enabling merchants to create online stores with Post Affiliate Pro integration for tracking sales. Modify shop footer and cart classes for click and sale tracking. Detailed integration steps provided.

Summer Cart

Summer Cart integration

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.

How to integrate PostAffiliatePro with Summer Cart

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

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

IMPORTANT: On place of <MERCHANT_USERNAME> use your merchant username and on place of <MERCHANT_PASSWORD> 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.

What is Summer Cart?

Summer Cart is a comprehensive e-commerce software solution designed to streamline the creation and management of online stores. It empowers businesses of all sizes to establish a robust online presence with ease. Offering a wide array of features such as product catalog management, order processing, customer relationship management, and integrated marketing tools, Summer Cart serves as an all-in-one platform for aspiring and established e-commerce ventures.

Developed by Mirchev Ideas, a Bulgarian software company founded by Georgi Mirchev, Summer Cart made its debut in 2008. Conceived with the goal of making online retail accessible and cost-effective for businesses in Bulgaria, it quickly gained traction. By 2014, Summer Cart had become the backbone for over 2,700 online stores, demonstrating its versatility and the value it brought to the e-commerce landscape.

Summer Cart primarily caters to small and medium-sized enterprises (SMEs) across diverse industries, including fashion, electronics, and home goods. Its user-friendly interface and extensive feature set make it an ideal choice for businesses seeking an integrated solution. With its mobile-responsive designs, multi-language and multi-currency support, and advanced B2B functionalities, Summer Cart enables businesses to expand their reach and enhance online sales effortlessly.

Key Features of Summer Cart

  • SEO Optimization Tools: Enhance your store’s visibility on search engines to attract more customers.
  • Advanced Admin Panel: Manage your store efficiently with over 1,000 functionalities at your fingertips.
  • Responsive and Customizable Design: Create a unique online storefront that looks great on any device.
  • Enhanced Sales and Marketing Tools: Boost your sales with features like abandoned cart recovery.
  • International Support: Cater to a global audience with multi-language and multi-currency options.
  • Robust Security Measures: Protect customer data with advanced security features.

Summer Cart Pricing Options

Summer Cart offers flexible pricing plans to suit different business needs, ranging from $222 to $829 per year. Each tier provides varying levels of features and support, allowing businesses to choose a plan that aligns with their requirements. For detailed pricing information, visit the official Summer Cart Pricing Page.

User Insights on Summer Cart

While specific user reviews are not accessible here, feedback generally highlights Summer Cart’s extensive features and user-friendly interface. Some users note that there may be a learning curve due to the software’s depth, and pricing can be a consideration for some businesses. For detailed testimonials and reviews, it is advisable to consult dedicated review platforms such as G2.

Video Review of Summer Cart

Alternatives to Summer Cart

If you’re exploring other options besides Summer Cart, consider these popular e-commerce platforms:

  • BigCommerce
  • Spocket
  • Payhip
  • Rap Booster
  • Weebly Ecommerce
  • WooCommerce
  • PrestaShop
  • OpenCart
  • Wix
  • Squarespace

These alternatives offer a variety of features and pricing models that might align with your specific business needs.

Frequently asked questions

What is Summer Cart?

Summer Cart is a comprehensive e-commerce software solution that helps businesses create and manage online stores. It includes features like product catalog management, order processing, customer relationship management, and integrated marketing tools.

How do I integrate Post Affiliate Pro with Summer Cart?

Integration requires adding click tracking code to your Summer Cart's footer template and modifying shopping cart classes to handle sale and transaction tracking using Post Affiliate Pro’s API. Detailed step-by-step instructions are provided in the integration guide.

What are the benefits of using Summer Cart with Post Affiliate Pro?

Combining Summer Cart with Post Affiliate Pro enables precise affiliate tracking, automated transaction management, and streamlined affiliate program operations for your e-commerce store.

Is Summer Cart suitable for my business?

Summer Cart is ideal for small and medium-sized businesses seeking an all-in-one e-commerce solution with extensive features, mobile-responsive design, international support, and advanced security.

Are there alternatives to Summer Cart?

Yes. Alternatives include BigCommerce, Spocket, Payhip, Rap Booster, Weebly Ecommerce, WooCommerce, PrestaShop, OpenCart, Wix, and Squarespace.

Lucia is a talented content editor who ensures the seamless publication of content across multiple platforms.

Lucia Halašková
Lucia Halašková
Content Editor

Boost Your Affiliate Marketing with Post Affiliate Pro

Integrate your Summer Cart store with Post Affiliate Pro for advanced affiliate tracking and seamless sales management. Start optimizing your affiliate program today!

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface