
Interspire Shopping Cart (especially for Google Checkout)
Learn how to integrate Post Affiliate Pro with Interspire Shopping Cart (especially for Google Checkout). Step-by-step instructions for seamless affiliate track...
Learn how to integrate Interspire Shopping Cart with Post Affiliate Pro to accurately track sales, manage commissions, and enhance your affiliate program.
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+.
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.
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.
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) {
......
......
}
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.
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.
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
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.
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.
The platform boasted a rich set of features designed to simplify e-commerce operations:
Interspire Shopping Cart offered tiered pricing plans to accommodate different business needs and budgets. The pricing structure typically included:
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.
Users of Interspire Shopping Cart appreciated its ease of use and the breadth of features offered. Positive feedback often highlighted:
Some users, however, mentioned limitations such as:
With Interspire Shopping Cart no longer in operation, businesses have turned to alternative e-commerce platforms that offer modern features and ongoing support:
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.
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.
The integration method includes specific instructions for both version 5.x and 6.x of Interspire Shopping Cart, ensuring compatibility with these releases.
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.
Alternatives include Shopify, WooCommerce, Magento (Adobe Commerce), BigCommerce, and Squarespace Commerce—modern platforms offering robust e-commerce features and ongoing support.
Discover how seamless integrations like Interspire Shopping Cart can help you track sales and optimize commissions. Start your free trial today!
Learn how to integrate Post Affiliate Pro with Interspire Shopping Cart (especially for Google Checkout). Step-by-step instructions for seamless affiliate track...
Would you like to improve your affiliate software even more? Check out the ShopSite integration for Post Affiliate Pro.
Learn how to seamlessly integrate PremiumWebCart with Post Affiliate Pro. Follow our step-by-step guide to configure business automation, activate plugins, and ...