Integration For xt:Commerce

Contents

1 Instructions for xt:Commerce 3
2 Instructions for xt:Commerce VEYTON

 

Instructions for xt:Commerce 3

Step 1.

1.  Open the file checkout_process.php
2. In the open file, locate the following line:

// load the after_process function from the payment modules
$payment_modules->after_process();

3. Insert after it:

//FeedPlatform Conversion Tracking Code
$_SESSION[‘order_id’] = $insert_id;
$_SESSION[‘order_total’] = floatval($order->info[‘total’]);
$order_products_id = ”;
for ($i=0, $n=sizeof($order->products); $i<$n; $i++)
{
$order_products_ids .= ($i!=0 ? ‘|’ : ”) . $order->products[$i][‘id’];
}
$_SESSION[‘order_products_ids’] = $order_products_ids;
//End of FeedPlatform Conversion Tracking Code

4. Save and close the file.

Important: Please replace <ACCOUNT_ID> with actual Account ID. You can find Account ID at Edit Campaign -> Traffic Tracking -> Conversion Tracking.

Step 2.

1. Open the file checkout_success.php
2. In the open file, locate the following line:

$main_content = $smarty->fetch(CURRENT_TEMPLATE.’/module/checkout_success.html’);

3. Insert after it:

$main_content = “n” .'<img src=”http://track.feedplatform.com/conversion/<ACCOUNT_ID>/?products_ids=’ . $_SESSION[‘order_products_ids’] . ‘&order_total=’ . $_SESSION[‘order_total’] . ‘&order_id=’ . $_SESSION[‘order_id’] . ‘”/>’ . $main_content;unset($_SESSION[‘order_products_ids’]);unset($_SESSION[‘order_total’]);unset($_SESSION[‘order_id’]);

4. Save and close the file.

 

Instructions for xt:Commerce VEYTON

Step 1.

1. Open the file xtCore/pages/page_action/checkout.success.php

2. In the open file, insert the following line before the last symbol “?>”:

$order_products_id = ”; if (is_array($success_order->order_products)) { foreach ($success_order->order_products as $order_product) {$order_products_ids .= $order_product[‘orders_products_id’] . ‘|’;}$order_products_ids = substr($order_products_ids, 0, -1);}define(‘FEEDPLATFORM_CONVERSION_TRACKING_CODE’, ‘<img src=”http://track.feedplatform.com/conversion/<ACCOUNT_ID>/?products_ids=’ . $order_products_ids . ‘&order_total=’ . $success_order->order_total[‘total’][‘plain’] . ‘&order_id=’ . $success_order->oID . ‘” />’);

3. Save and close the file.

Important: Please replace <ACCOUNT_ID> with actual Account ID. You can find Account ID at Edit Campaign -> Traffic Tracking -> Conversion Tracking.

Step 2.

1. Open the file templates/xt_default/xtCore/pages/checkout/subpage_success.html or templates/[your_active_skin_directory]/xtCore/pages/checkout/subpage_success.html (if exist)

2. In the open file, insert the following line at the beginning of the file:

{txt key=FEEDPLATFORM_CONVERSION_TRACKING_CODE}

3. Save and close the file.

 

Scroll to Top