All Collections
Integrations
Integrating with HikaShop
Integrating with HikaShop

Learn how to integrate Tapfiliate with HikaShop.

Maria avatar
Written by Maria
Updated over a week ago
  1. In your HikaShop admin area, go to Extensions > Template Manager > Templates and choose your current template.

  2. Paste the code from below to the index.php file, right 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>

Make sure to replace 'YOUR ACCOUNT ID' with your actual Tapfiliate account ID (can be found in your Profile settings).

3. Save the changes and go to Components > HikaShop > Configuration. From the subnavigation, select Display > Views.

4. Find the Checkout: End file for the template you use.

Install the Tapfiliate tracking with Hikashop

5. At the end, add the following code in the editor:

$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 . ");

";

}

Make sure to replace 'YOUR ACCOUNT ID' with your actual Tapfiliate account ID.

Save and don't forget to test your integration before going live.

You can additionally check out our HikaShop integration guide here.

Did this answer your question?