Integrating with Hikashop

Out-of-the-box features:
  • Conversion tracking
  • Commission based on order amount
  • Track affiliate coupon code conversions
  • Supports lifetime commissions
  • Auto-handle recurring commissions
  • Auto-handle refunds and disputes
  1. Login to your admin area and go to Extensions > Template Manager > Templates and select your current template
  2. Paste the following code in the index.php file, just after the <body> tag

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
            (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
            (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
            tap('create', '((((YOUR ACCOUNT ID))))', { integration: "hikashop" });
            tap('detect');
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  3. Hit Save Changes

  4. Go to Components > Hikashop > Configuration. Next from the sub navigation select Display > Views

  5. Next find the Checkout (view) : End (file) for your current template.
    Install the Tapfiliate tracking with Hikashop

  6. In the editor, append the following code at the end:

    $order_id = JRequest::getInt('order_id');
    if(empty($order_id)){
        $app = JFactory::getApplication();
        $order_id = $app->getUserState('com_hikashop.order_id');
    }
    $order =null;
    if(!empty($order_id)){
        $orderClass = hikashop_get('class.order');
        $order = $orderClass->loadFullOrder($order_id,false,false);
        echo "
    
          (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
          (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
          tap('create', '((((YOUR ACCOUNT ID))))', { integration: 'hikashop' });
          tap('conversion', '" . $order->order_number . ", " . $order->order_subtotal_no_vat . ");
    
    ";
    }
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  7. Hit Save Changes and you are all done!

Important

Please remember to test a conversion before starting your program. This way you can verify that tracking has been set up correctly. You can create a test conversion by following the steps described here.

Start a 14-day free trial with all our features enabled