Home Integration Methods Foxy Cart

Foxy Cart

Integration with Foxy Cart - a hosted e-commerce solution that was built specifically with web developers in mind. 
1
Login
Log into your FoxyCart store's Admin Page, go to Templates> Receipt. In case there is no code yet, click to the FoxyCart Standard template.
2
Integration - track whole cart as one transaction
Above the  </body> tag of the code of receipt template insert the following code:
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 ones:
sale.setTotalCost('^^subtotal^^');
sale.setOrderID('^^order_id^^');


in the code given in the box above.

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 }} .
3
Coupon tracking
In case you would like to use coupon tracking, use this version of code:
4
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:
That's it.
5
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.

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:

Foxycart supports twig syntax: