Shopping Carts from 3dCart are complete e-commerce storefront solutions for your new or existing web site. Easily build, edit, and maintain your online shop and collect orders without any programming or HTML knowledge!
This integration integrates template for 3DCart's thank you page.

NOTE: Your installation of Post Affiliate Pro must be available via HTTPS:// because the checkout happens in a secured page.


Add sale tracking code

Go to Settings> Design> Themes & Styles> Under More button choose Edit Template (HTML) and edit file "checkout-step4.html" to add following code to the very end:

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

var sale = PostAffTracker.createSale();

var discount='[discounts]';
var splitDiscount = discount.split("$");
var numberDiscount = splitDiscount[1];

var total='[osubtotal]';
var splitTotal = total.split("$");
var numberTotal = splitTotal[1];
var TotalLessDiscount = numberTotal - numberDiscount;



If you need to add more information in sale tracking code, please refer to this guide on 3DCart:

To utilize the Coupons feature add right under sale.setOrderID('[invoice-prefix][invoice-number]'); the following:


Product ID matching

If you want to track per product commissions, you have to use this integration code instead of the above one. The instructions are almost the same - edit the same file checkout-step4.html and add this code to the first line of the file:

<!-- PAP Integration snippet - part1 -->
<input type="hidden" id="itemNums" value="0">

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js"></script>>

<!-- checking if any discount (not gift certificate!) has been applied -->
<script type="text/javascript">
	var papItems = [];
	var discount = '[discounts]';
	var splitDiscount = discount.split('$');
	if (splitDiscount[1]>0) {
		var numberDiscount = splitDiscount[1];
<!-- /PAP Integration snippet - part1 -->

Now find this line <!--START: items--> and add this code below it:

<!-- PAP Integration snippet - part2 -->
	<script type="text/javascript">
	var i = document.getElementById('itemNums').value;
	var iIncremented = ++i;

	var subTotal = '[subtotal]';
	var splitSubTotal = subTotal.split('$');
	subTotal = splitSubTotal[1];

	papItems[i-1] = {"subTotal":subTotal, "id":'[id]', "orderId":"[invoice-prefix][invoice-number]("+iIncremented+")"};
<!-- /PAP Integration snippet - part2 -->

The last part of the code goes to the very end of the same file:

<!-- PAP Integration snippet - part3 -->
<script type="text/javascript">
	var discountPerItem = 0;
	if (typeof numberDiscount != 'undefined') {
		discountPerItem = numberDiscount / document.getElementById('itemNums').value;

	papItems.forEach(function (item, index) {
		var sale = PostAffTracker.createSale();
		sale.setTotalCost(item.subTotal - discountPerItem);
<!-- /PAP Integration snippet - part3 -->

The application will use product IDs defined in your 3DCart so you can easily check each product ID in Products > View


Lifetime commissions

Tip: If you wish to utilize Lifetime Commissions, then in the checkout-step4.html file find the following line:

<td class="item">[oemail]</td>

and right below that line add this code:

<!-- Post Affiliate Pro integration snippet -->
<script type="text/javascript">
var customerEmail = '[oemail]';
<!-- Post Affiliate Pro integration snippet -->

The last step is to add this line into the sale tracking code: