Interspire Shopping Cart

Learn how to integrate Interspire Shopping Cart with Post Affiliate Pro to accurately track sales, manage commissions, and enhance your affiliate program.

Interspire Shopping Cart

Interspire Shopping Cart integration

A feature rich shopping cart software that includes everything you need to start, run, and promote your online store. This integration method by By Dustin Holdiman will help you to integrate PAP with Interspire Shopping Cart 5.0+.

What is this script for?

This setup was created to track each product and quantity of product ordered in Interspire Shopping Cart. What this script does is to post each product ordered as a separate sale to PAP. This way, if a user purchases 3 different products and 2 of each of those products, 6 sales will be registered with PAP and you will know the correct commission to pay the affiliate.

How to integrate PostAffiliatePro with Interspire Shopping Cart

First you need to create a campaign for EACH item that should has a different commission. So for instance, Product A gets a $10 commission, Product B is $12 and Product C is $8. I will create 3 campaigns and for assign the Product ID to each campaign that is set by Interspire. By default you can find this information in the database by looking in the table isc_products and checking the productid cell. After you have setup your campaigns that’s all you need to do with PAP to continue.

How to setup Interspire Shopping Cart

You need to edit the file class.order.php. This script is found in your Interspire install directory in includes/classes/class.order.php. Scroll the file down to around line 178. You are looking for the foreach loop that is commented. This is the code:

// Include the conversion tracking code for [affiliates](https://www.postaffiliatepro.com/affiliate-marketing-glossary/affiliate/ "Discover the role of an affiliate in marketing—earn commissions by promoting products through banners, links, and campaigns. Learn how affiliates drive sales and explore effective marketing strategies. Join the world of affiliate marketing with Post Affiliate Pro for user-friendly tools and exceptional support.")
foreach ($this->pendingData['orders'] as $order) {
  if (strlen(GetConfig('AffiliateConversionTrackingCode')) > 0) {
......
......
}

Replacing the code (applies to version 5.x of Interspire Shopping Cart)

Copy the entire foreach loop and replace it with the following code:

//////////////////////////////////////////////////////////////////////////////////////////////////
foreach ($this->pendingData['orders'] as $order) {
            if (strlen(GetConfig('AffiliateConversionTrackingCode')) > 0) {
                $converted_code = GetConfig('AffiliateConversionTrackingCode');
                $converted_code = str_ireplace('%%ORDER_AMOUNT%%', $order['ordsubtotal'], $converted_code);
                $converted_code = str_ireplace('%%ORDER_ID%%', $order['orderid'], $converted_code);

		//retreive customer id for the particular order in order to take use of [Lifetime Commissions](https://www.postaffiliatepro.com/features/lifetime-commissions/ "Unlock the power of Lifetime Commissions with Post Affiliate Pro! Build stable, long-term income streams and strengthen relationships with high-quality affiliates. Ideal for individuals, start-ups, SMBs, and enterprises, this feature ensures commissions for all future sales from customers, even beyond cookie expiration. Explore how this reliable system can drive your affiliate program's success today!")
		$query_custid = "SELECT ordcustid FROM isc_orders WHERE orderid='".$order['orderid']."'";
		$result_custid = mysql_query($query_custid);
		$custid = mysql_fetch_row($result_custid);
		$customerid = $custid[0];


                $query_proid = "SELECT * FROM isc_order_products WHERE orderorderid='".$order['orderid']."'";
                $result_proid = mysql_query($query_proid);
                $prod_data = '';
                // Setup string to look like PRODUCTID:QUANTITY:PRICE,
                while ($row_proid = mysql_fetch_array($result_proid)) {
                        $prodarr[] = $row_proid['ordprodid'].':'.$row_proid['ordprodqty'].':'.$row_proid['ordprodcost'];
                }
		$java_arr[] = "<script type=\"text/javascript\">
		PostAffTracker.setAccountId('Account_ID');"; // Start javascript array
		$prod_count = '1'; // Product Counter

                // Separate string by ,
                foreach ($prodarr as $value) {
                    // Split apart string by : (PRODUCTID:QUANTITY:PRICE)
                    $prod_info = explode(":", $value);

		// Not needed but here for referance
                    //$converted_code = str_ireplace('%%PRODUCT_ID'.$prod_count.'%%',$prod_info[0], $converted_code);
                    //$converted_code = str_ireplace('%%QUANTITY_ID'.$prod_count.'%%',$prod_info[1], $converted_code);

                    // Create sale code for each product x the quantity ordered
					$quantity = $prod_info[1];
					while ($quantity >= 1){
						$java_string = "
							var sale".$prod_count." = PostAffTracker.createSale();
							sale".$prod_count.".setTotalCost('".$prod_info[2]."');
							sale".$prod_count.".setOrderID('".$order['orderid']."(".$prod_count.")');
							sale".$prod_count.".setProductID('".$prod_info[0]."');
							sale".$prod_count.".setData1('".$customerid."');";

						$java_arr[] = $java_string;

						$img_arr[] = '<img src="https://URL_TO_PostAffiliatePro/scripts/sale.php?TotalCost='.$prod_info[2].'&OrderID='.$order['orderid'].'_'.$prod_count.'&ProductID='.$prod_info[0].'" width="1" height="1">';
						$prod_count++; // Increase Product Counter by 1
						$quantity = $quantity-1;
					}
                }
                // Image Loop - Returns $img as all img src created in foreach loop
                $img = implode("", $img_arr);

				// Finish off javascript code
				$java_arr[] = "
				PostAffTracker.register();
				</script>";

                // Build string from array created in for each loop
				$java = implode("", $java_arr);

                $converted_code = str_ireplace('%%JAVA%%', $java, $converted_code); // Simply Insert %%JAVA%% into [affiliate tracking](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") section of interspire
                $converted_code = str_ireplace('%%IMG_CODE%%', $img, $converted_code); // Simply Insert %%IMG_CODE%% into [affiliate](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") tracking section of interspire
                $GLOBALS['ConversionCode'] .= $converted_code;
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // End Edit
        }

Now simply save the file.

Replacing the code (applies to version 6.x of Interspire Shopping Cart)

Copy the entire foreach loop and replace it with the following code:

//////////////////////////////////////////////////////////////////////////////////////////////////
foreach ($this->pendingData['orders'] as $order) {
            if (strlen(GetConfig('AffiliateConversionTrackingCode')) > 0) {
                $converted_code = GetConfig('AffiliateConversionTrackingCode');
                $converted_code = str_ireplace('%%ORDER_AMOUNT%%', $order['ordsubtotal'], $converted_code);
                $converted_code = str_ireplace('%%ORDER_ID%%', $order['orderid'], $converted_code);

		//retreive customer id for the particular order in order to take use of Lifetime Commissions
		$query_custid = "SELECT ordcustid FROM ".$GLOBALS['ISC_CFG']["tablePrefix"]."orders WHERE orderid='".$order['orderid']."'";
		$result_custid = mysql_query($query_custid);
		$custid = mysql_fetch_row($result_custid);
		$customerid = $custid[0];

                //check if there was a coupon used and get it's code
                $query_coupon = 'SELECT ordcouponcode FROM '.$GLOBALS['ISC_CFG']['tablePrefix']."order_coupons WHERE ordcouporderid='".$order['orderid']."'";
                $result_coupon = mysql_query($query_coupon);
                try {
                  $couponrow = mysql_fetch_row($result_coupon);
                  $coupon = $couponrow[0];
                }
                catch (Exception $e) {
                    // no coupon found
                    $coupon = '';
                }

                $query_proid = "SELECT * FROM ".$GLOBALS['ISC_CFG']["tablePrefix"]."order_products WHERE orderorderid='".$order['orderid']."'";
                $result_proid = mysql_query($query_proid);
                $prod_data = '';
                // Setup string to look like PRODUCTID:QUANTITY:PRICE,
                while ($row_proid = mysql_fetch_array($result_proid)) {
                        $prodarr[] = $row_proid['ordprodid'].':'.$row_proid['ordprodqty'].':'.$row_proid['base_price'].':'.$this->sumDiscountAndCoupon($row_proid['applied_discounts']);
                }
		$java_arr[] = "<script type=\"text/javascript\">
		PostAffTracker.setAccountId('Account_ID');"; // Start javascript array
		$prod_count = '1'; // Product Counter

                // Separate string by ,
                foreach ($prodarr as $value) {
                    // Split apart string by : (PRODUCTID:QUANTITY:PRICE)
                    $prod_info = explode(":", $value);

		// Not needed but here for referance
                    //$converted_code = str_ireplace('%%PRODUCT_ID'.$prod_count.'%%',$prod_info[0], $converted_code);
                    //$converted_code = str_ireplace('%%QUANTITY_ID'.$prod_count.'%%',$prod_info[1], $converted_code);

                    // Create sale code for each product x the quantity ordered
                                        $totalCost = $prod_info[2]-($prod_info[3]/$prod_info[1]);
					$quantity = $prod_info[1];
					while ($quantity >= 1){
						$java_string = "
							var sale".$prod_count." = PostAffTracker.createSale();
							sale".$prod_count.".setTotalCost('".$totalCost."');
                                                        sale".$prod_count.".setOrderID('".$order['orderid']."(".$prod_count.")');
							sale".$prod_count.".setProductID('".$prod_info[0]."');
							sale".$prod_count.".setData1('".$customerid."');";
						if (!empty($coupon)) $java_string .= "sale".$prod_count.".setCoupon('$coupon');";

						$java_arr[] = $java_string;

						$img_arr[] = '<img src="https://URL_TO_PostAffiliatePro/scripts/sale.php?TotalCost='.$totalCost.'&OrderID='.$order['orderid']."_".$prod_count.'&ProductID='.$prod_info[0].'&Coupon='.$coupon.'" width="1" height="1" />';
						$prod_count++; // Increase Product Counter by 1
						$quantity = $quantity-1;
					}
                }
                // Image Loop - Returns $img as all img src created in foreach loop
                $img = implode("", $img_arr);

				// Finish off javascript code
				$java_arr[] = "
				PostAffTracker.register();
				</script>";

                // Build string from array created in for each loop
				$java = implode("", $java_arr);

                $converted_code = str_ireplace('%%JAVA%%', $java, $converted_code); // Simply Insert %%JAVA%% into [affiliate](https://www.postaffiliatepro.com/affiliate-marketing-glossary/affiliate/ "Discover the role of an affiliate in marketing—earn commissions by promoting products through banners, links, and campaigns. Learn how affiliates drive sales and explore effective marketing strategies. Join the world of affiliate marketing with Post Affiliate Pro for user-friendly tools and exceptional support.") tracking section of interspire
                $converted_code = str_ireplace('%%IMG_CODE%%', $img, $converted_code); // Simply Insert %%IMG_CODE%% into affiliate tracking section of interspire
                $GLOBALS['ConversionCode'] .= $converted_code;
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // End Edit
        }

Now simply save the file.

Add functions for computing discount (applies to version 6.x of Interspire Shopping Cart)

You are editting the file class.order.php still. Add the following code right before line : private function ThanksForYourOrder()

        //////////////////////////////////////////////////PAP integration functions
        //find all occurences of a needle inside a haystack
        private function strposall($haystack, $needle){
            $s=0;
            $i=0;
            while (is_integer($i)){
                $i = strpos($haystack,$needle,$s);
                if (is_integer($i)) {
                    $aStrPos[] = $i;
                    $s = $i+strlen($needle);
                }
            }
            if (isset($aStrPos)) {
                return $aStrPos;
            }
            else {
                return false;
            }
        }

        private function getDiscountFromPosition($discountsString, $position) {
            $substring = substr($discountsString, $position+2);
            return substr($discountsString, $position+2, strpos($substring, ';'));
        }

        private function sumDiscountAndCoupon($discountsString) {
            if (is_null($discountsString) || $discountsString == '' || !strstr($discountsString, 'd:')) {
                return 0;
            }
            $sum = 0;
            foreach ($this->strposall($discountsString, 'd:') as $position) {
                $sum += $this->getDiscountFromPosition($discountsString, $position);
            }
            return $sum;
        }
        /////////////////////////////////////////////////end PAP integration functions

Setting up the Interspire settings

Openup your administration panel in Interspire, go to Settings / Affiliate Settings and paste the following code into the textarea :

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
%%JAVA%%

Or if you do not wish to use javascript toreport to PAP, you can use the IMG SRC tag by replacing %%JAVA%% with %%IMG_CODE%%.

NOTE: Using PayPal integration plugin with Interspire integration.

It is not recommended to use Interpsire integration along with PayPal integration (or integration of another payment processor supported by Interspire) plugin. This can lead to double-tracked transactions. You need to set up a sale fraud protection to avoid them.

Interspire is handling all transactions (processes all transactions regardless the payment method) itself and because of that, you should use this Interspire Integration only.

If this integration is not suitable for you try an alternative one.

Any questions / comments / suggestions please email Dustin dmanz013@gmail.com.

What is Interspire Shopping Cart?

Interspire Shopping Cart was a comprehensive e-commerce platform designed to empower businesses with a robust online selling solution. Developed with user-friendly features and a focus on small to medium-sized enterprises, it provided tools for setting up, managing, and promoting online stores. Although the platform has been discontinued, its legacy offers valuable insights into e-commerce development and the evolution of online retail solutions.

Interspire Shopping Cart emerged as a product of Interspire, a company known for its web-based software solutions. Launched to address the growing need for accessible e-commerce platforms, it quickly gained traction among businesses seeking an all-in-one shopping cart system. Over the years, it evolved by integrating new features and responding to user feedback. However, with the rise of more advanced competitors and shifting market demands, Interspire eventually ceased the development of the Shopping Cart software, redirecting its focus to other ventures.

Interspire Shopping Cart was tailored for small and medium-sized businesses aiming to establish or enhance their online presence. Its intuitive interface and comprehensive features made it attractive to entrepreneurs without extensive technical expertise. Retailers, wholesalers, and niche market sellers found the platform especially beneficial for launching online stores quickly and efficiently.

Main Features of Interspire Shopping Cart

The platform boasted a rich set of features designed to simplify e-commerce operations:

  • User-Friendly Administration : Easy-to-navigate control panel for managing products, orders, and customers.
  • Customizable Storefronts : A variety of templates and themes that allowed businesses to customize the look and feel of their online stores.
  • Inventory Management : Tools to track stock levels, set inventory alerts, and manage product options.
  • Marketing and SEO Tools : Built-in features for search engine optimization, email marketing integrations, and promotional tools like coupons and discounts.
  • Multiple Payment Gateways : Support for various payment options, including credit cards, PayPal, and more.
  • International Support : Multi-currency and multilingual capabilities to cater to a global customer base.
  • Reporting and Analytics : Detailed reports on sales, customer behavior, and store performance to inform business decisions.

Pricing of Interspire Shopping Cart

Interspire Shopping Cart offered tiered pricing plans to accommodate different business needs and budgets. The pricing structure typically included:

  • Starter Plans : For newcomers with basic requirements, providing essential features at a lower cost.
  • Professional Plans : Mid-tier options with advanced features suitable for growing businesses.
  • Enterprise Plans : Comprehensive packages with full feature access, prioritized support, and customization options.

Since the platform has been discontinued, these pricing plans are no longer available. Businesses interested in similar solutions may explore current market offerings with comparable pricing structures.

User Insights on Interspire Shopping Cart

Users of Interspire Shopping Cart appreciated its ease of use and the breadth of features offered. Positive feedback often highlighted:

  • Simplicity : The straightforward setup process and manageable learning curve.
  • Comprehensive Tools : Inclusion of essential e-commerce functionalities without the need for additional plugins.
  • Customer Support : Responsive assistance during its operational period.

Some users, however, mentioned limitations such as:

  • Customization Constraints : Challenges with customizing beyond provided templates without technical expertise.
  • Scalability Issues : Difficulties in accommodating significant business growth or high traffic volumes.
  • Lack of Updates : Concerns over software updates and maintenance leading up to its discontinuation.

Alternatives to Interspire Shopping Cart

With Interspire Shopping Cart no longer in operation, businesses have turned to alternative e-commerce platforms that offer modern features and ongoing support:

  • Shopify : A widely-used platform known for its ease of use, extensive app store, and scalability.
  • WooCommerce : An open-source plugin for WordPress users seeking customizable online store capabilities.
  • Magento (Adobe Commerce) : Offering advanced features and customization for larger businesses requiring robust solutions.
  • BigCommerce : Providing a balance of usability and comprehensive features suitable for various business sizes.
  • Squarespace Commerce : Ideal for businesses emphasizing design and aesthetics alongside e-commerce functionality.

Frequently asked questions

What is the purpose of the Interspire Shopping Cart integration with Post Affiliate Pro?

This integration enables you to track each product and quantity ordered in Interspire Shopping Cart as separate sales in Post Affiliate Pro, ensuring accurate commission calculation for your affiliates.

How do I set up the integration between Interspire Shopping Cart and Post Affiliate Pro?

You need to create a separate campaign in Post Affiliate Pro for each product, assign the product ID, and modify the class.order.php file in your Interspire installation using the provided script. Then, configure the affiliate settings in Interspire by adding the tracking code.

Is the integration compatible with all versions of Interspire Shopping Cart?

The integration method includes specific instructions for both version 5.x and 6.x of Interspire Shopping Cart, ensuring compatibility with these releases.

Can I use this integration together with PayPal or other payment processor integrations?

It is not recommended to use the Interspire integration together with PayPal or other payment processor plugins to avoid double-tracked transactions. Use sale fraud protection if necessary.

What alternatives exist to Interspire Shopping Cart?

Alternatives include Shopify, WooCommerce, Magento (Adobe Commerce), BigCommerce, and Squarespace Commerce—modern platforms offering robust e-commerce features and ongoing support.

Enhance Your Affiliate Program with Post Affiliate Pro

Discover how seamless integrations like Interspire Shopping Cart can help you track sales and optimize commissions. Start your free trial 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