Foxy Cart

Integrate FoxyCart with Post Affiliate Pro to track transactions, coupons, and customer emails, leveraging features like Lifetime Commissions and product ID matching. Supports whole cart or individual product tracking for FoxyCart v2.0+.

Foxy Cart

How to integrate PostAffiliatePro with Foxy Cart

Login

Log into your FoxyCart store’s AdminPage, go to Templates > Receipt . In case there is no code yet, click to the FoxyCart Standard template .

Integration – track whole cart as one transaction

Above the tag of the code of receipt template insert the following code:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
var ototal = '{{ total_order }}';
var odiscount = '{{ total_discount }}';
var oshipping = '{{ total_shipping }}';
var otax = '{{ total_tax }}';

var ofinalprice = ototal - odiscount - oshipping - otax;

PostAffTracker.setAccountId('default1');
var sale = PostAffTracker.createSale();;
sale.setTotalCost(ofinalprice);
sale.setOrderID('{{ order_id }}');
PostAffTracker.register();
</script>

Click the update template button and save your work.

For older versions of FoxyCart skip the rows that declare (define) the ‘ ototal ‘, …, ‘ ofinalprice ‘ variables and instead of these 2 lines of code:

sale.setTotalCost(ofinalprice);
sale.setOrderID('{{ order_id }}');

use these following in the code given in the box above:

sale.setTotalCost('^subtotal^');
sale.setOrderID('^order_id^');

If you wish to track the customer’s email address into the ‘Data1’ parameter of sale tracking code in order to utilize Lifetime Commissions , then right above:

PostAffTracker.register();

add the following code:

sale.setData1('{{ customer_email }}');

In older versions use ^customer_email^ instead of {{ customer_email }} .

Coupon tracking

In case you would like to use coupon tracking , use this version of code:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
var coupon_code = "";
if(FC.json.hasOwnProperty('[coupons](https://www.postaffiliatepro.com/features/discount-coupons/ "Unlock the power of affiliate discount coupons with Post Affiliate Pro! Easily create, customize, and track coupons to boost brand promotion and sales. Ideal for individuals, start-ups, SMBs, and enterprises, our user-friendly software simplifies coupon management, enhancing affiliate marketing success. Explore how coupons can drive customer loyalty and satisfaction today!")')) {
  $.each(FC.json.coupons, function(i, coupon){
    if(coupon.name.search(/CS4/i) > -1) {
      coupon_code = coupon.name;
    }
  });
}

var ototal = '{{ total_order }}';
var odiscount = '{{ total_discount }}';
var oshipping = '{{ total_shipping }}';
var otax = '{{ total_tax }}';

var ofinalprice = ototal - odiscount - oshipping - otax;

PostAffTracker.setAccountId('default1');
var sale = PostAffTracker.createSale();;
sale.setTotalCost(ofinalprice);
sale.setOrderID('{{ order_id }}');
sale.setCoupon(coupon_code);
PostAffTracker.register();
</script>

Integration – tracking each product as a separate transaction

This option is available for FoxyCart version 2.0 and higher.

If you wish to take use of product id matching capability of Post Affiliate Pro, then you need to use a different integration code instead of the one mentioned in step no. 3.

Here is the code to be used:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
{% set counter = 0 %}

{% for item in items %}

<script type="text/javascript">
PostAffTracker.setAccountId('deafult1');
var sale{{ counter }} = PostAffTracker.createSale();
sale{{ counter }}.setTotalCost('{{ item.price }}');
sale{{ counter }}.setProductID('{{ item.code }}');
sale{{ counter }}.setOrderID('{{ order_id }}_{{ counter }}');
sale{{ counter }}.setData1('{{ customer_email }}');
PostAffTracker.register();
</script>

{% set counter = counter + 1 %}

{% endfor %}

That’s it.

Integration – tracking each product as a separate transaction + coupon tracking

This option is available for FoxyCart version 2.0 and higher.

If you wish to utilize coupon tracking along with the per product tracking, then use the following code instead of the one in step no.5.

This option is available for FoxyCart version 2.0 and higher.

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
{% set counter = 0 %}

{% for item in items %}

<script type="text/javascript">
var coupon_code = "";
if(FC.json.hasOwnProperty('coupons')) {
  $.each(FC.json.coupons, function(i, coupon){
    if(coupon.name.search(/CS4/i) > -1) {
      coupon_code = coupon.name;
    }
  });
}

PostAffTracker.setAccountId('deafult1');
var sale{{ counter }} = PostAffTracker.createSale();
sale{{ counter }}.setTotalCost('{{ item.price }}');
sale{{ counter }}.setProductID('{{ item.code }}');
sale{{ counter }}.setOrderID('{{ order_id }}_{{ counter }}');
sale{{ counter }}.setCoupon(coupon_code);
sale{{ counter }}.setData1('{{ customer_email }}');
PostAffTracker.register();
</script>

{% set counter = counter + 1 %}

{% endfor %}

If you wanted to track some more details into the Extra Data 2-5 fields of sale tracking code, check out the details available in the receipt template of foxycart:

https://wiki.foxycart.com/v/2.0/receipt

Foxycart supports twig syntax:

http://twig.sensiolabs.org/doc/templates.html

What is Foxy Cart?

Foxy Cart is a versatile ecommerce platform designed to seamlessly integrate with existing websites or platforms. It offers a hosted cart and secure payment page, allowing businesses to sell a wide array of products, including physical items, digital downloads, subscriptions, and even accept donations. With support for over 90 payment gateways and multi-currency transactions, Foxy Cart provides a global solution for businesses that desire control over their website design and product management while leveraging robust ecommerce capabilities.

Founded in 2006, Foxy Cart emerged with the goal of reimagining the ecommerce experience. By 2007, it officially launched and quickly gained momentum, processing over $200 million in transactions by 2012. A significant milestone was the release of the Hypermedia API in 2015, which marked a major expansion of the platform’s capabilities and led to a rebranding simply as “Foxy.” Today, Foxy Cart continues to evolve, powered by a global team dedicated to enhancing ecommerce solutions for merchants and developers worldwide.

Foxy Cart is tailored for developers and technically skilled users who require a customizable and flexible ecommerce platform. It’s particularly suited for businesses comfortable working with HTML and API integrations. By offering the benefits of a locally hosted cart combined with the security and PCI compliance of a hosted checkout system, Foxy Cart appeals to those seeking a balance between control and convenience in their ecommerce operations.

Key Features of Foxy Cart

  • Unlimited Product Types: Sell physical goods, digital downloads, subscriptions, and accept donations without limitations.
  • Payment Gateway Integration: Seamlessly connect with over 90 payment gateways and support multi-currency transactions to cater to an international customer base.
  • Customizable Cart and Checkout: Personalize your cart and offer a streamlined, one-page checkout experience along with customized transaction emails.
  • International Support: Benefit from multi-language capabilities and set up international tax configurations to comply with global regulations.
  • Security and Compliance: Enjoy a fully hosted solution that’s PCI DSS compliant, ensuring secure transactions, with an API available for further integrations.

Foxy Cart Pricing Options

  • Standard Plan: Priced at $21.25 per month when billed annually or $25 per month on a monthly basis, plus 20¢ per transaction.
  • Advanced Plan: At $250 per month annually or $300 monthly, plus 5¢ per transaction, this plan offers advanced features for growing businesses.
  • Enterprise Plan: Starting at $2000+ per month, this option provides custom integrations and dedicated support for large-scale operations.
  • Special Offers: Foxy Cart offers discounts for non-profit organizations and a free unlimited trial for new users to explore the platform’s capabilities.

User Insights on Foxy Cart

Pros:

  • Developer-Friendly: Ideal for those with technical skills, offering extensive customization and integration possibilities.
  • Flexible Integration: Easily integrates with existing websites, providing a seamless ecommerce addition without overhauling your current setup.
  • Modern Interface: Features a contemporary user interface that enhances both merchant and customer experiences.

Cons:

  • Technical Expertise Required: Not the most beginner-friendly platform; it requires a level of technical knowledge to utilize fully.

Overall, users who have the technical prowess appreciate Foxy Cart for its secure and highly customizable platform, making it a preferred choice among developers seeking flexibility.

Alternatives to Foxy Cart

If you’re exploring other options, several platforms offer similar capabilities, each with its unique strengths:

  • Snipcart: A customizable shopping cart solution that integrates with any website.
  • Shoprocket: An easy-to-use ecommerce platform with quick integration.
  • Shopify: A comprehensive ecommerce solution with a wide range of features and apps.
  • Ecwid: An ecommerce platform that adds a store to any existing site.
  • Webflow: A web design tool that includes ecommerce capabilities.
  • BigCommerce: A scalable platform suitable for businesses of all sizes.
  • WooCommerce: A WordPress plugin that turns your site into an online store.
  • Adobe Commerce (Magento): A powerful ecommerce platform for enterprise-level businesses.
  • Squarespace: Create stunning websites effortlessly with Squarespace’s industry-leading templates and intuitive drag-and-drop builder. Start your free trial, no credit card required, and explore our all-in-one platform designed for selling products, marketing your business, and building your online presence. Customize your site to reflect your brand and engage your audience with built-in SEO and social media tools. Get started today and transform your vision into a professional website. **: A website builder with integrated ecommerce functionalities.
  • Wix: Offers easy-to-use website building tools with ecommerce options.

Each of these alternatives caters to different preferences, whether you seek a turnkey solution or a platform that allows for extensive customization.

Frequently asked questions

What is Foxy Cart?

Foxy Cart is a versatile ecommerce platform designed to integrate with existing websites, offering a hosted cart and secure payment page for selling a wide range of products, supporting over 90 payment gateways and multi-currency transactions.

How do I integrate Foxy Cart with Post Affiliate Pro?

You can integrate Foxy Cart with Post Affiliate Pro by inserting tracking scripts into your receipt template, allowing you to track entire carts, individual products, coupon usage, and customer emails for Lifetime Commissions.

Does Foxy Cart support tracking coupons and customer emails for affiliate programs?

Yes, the integration allows you to track coupon codes and capture customer emails for features like Lifetime Commissions.

Who is Foxy Cart best suited for?

Foxy Cart is ideal for developers and technically skilled users who require a customizable, flexible ecommerce platform with robust integration options.

What are the pricing options for Foxy Cart?

Foxy Cart offers Standard, Advanced, and Enterprise plans, with monthly billing starting at $21.25, as well as special offers for non-profits and a free unlimited trial.

What are some alternatives to Foxy Cart?

Alternatives include Snipcart, Shoprocket, Shopify, Ecwid, Webflow, BigCommerce, WooCommerce, Adobe Commerce (Magento), Squarespace, and Wix.

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

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

Start Your Affiliate Integration

Integrate Foxy Cart with Post Affiliate Pro for seamless affiliate tracking, advanced coupon features, and flexible cart solutions.

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