HikaShop is a Joomla! extension - have your users purchase your products efficiently, facilitate the management of your store, increase your sales thanks to built-in marketing tools and so much more!

The integration is does by inserting a tracking code to HikaShop file templates. You can track order subtotal, order ID, customer ID (for Lifetime commission).


Sale tracking code

Login to your Joomla! admin backend and navigate to Components> HikaShop> Display>Views and use filter for a quicker search - filter out the 'checkout' view and the template you use. The template file we are looking for is '_afterend'. Click it, you will be able to edit it from there.

At the end of this file, simply add this code:

/* Post Affiliate Pro integration snippet */
$order_id = $app->getUserState(HIKASHOP_COMPONENT.'.order_id');
$orderClass = hikashop::get('class.order');
$order = $orderClass->get($order_id);
$user = JFactory::getUser($order->order_user_id);

echo '<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">'."
	var sale = PostAffTracker.createSale();
	sale.setTotalCost('".($order->order_full_price - $order->order_discount_price - $order->order_shipping_price)."');
/* /Post Affiliate Pro integration snippet */

Save your changes and you are done. It will track your sales now.

Do not forget to integrate your site with the click tracking code.