Welcome to the Kelkoo Group Customer Service

PrestaShop 1.7.x integration

Information for those merchants who use Prestashop 1.7.x

Implement the lead tag code

Go to the directory themes/xxxx/templates/_partials/ and open the file head.tpl

Simply add :

<script async="true" type="text/javascript" src="https://s.kk-resources.com/leadtag.js" ></script>

Then clear the cache.

Implement the conversion tag code

Go to the directory /controllers/front/ and open the file OrderConfirmationController.php.

Replace following code bloc:

    'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation($order),
    'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn($order),
    'order' => $presentedOrder,
    'register_form' => $register_form,

With following code bloc:

/* Kelkoo Sales Tracking */
$order = new Order($this->id_order);
$products = $order->getProducts();
foreach ($products as $product) {
     'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation($order),
     'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn($order),
     'products_json' => json_encode($productsKelkoo),
     'sales' => $order->getOrdersTotalPaid(),
     'orderid' => $this->id_order,
     'order' => $presentedOrder,
     'register_form' => $register_form,
/* end Kelkoo Sales Tracking*/

Then go to the directory /themes/xxxx/templates/checkout/_partials/ (where xxxx is the name of the theme you chose, the default is “classic”), open the file order-confirmation-table.tpl and add Kelkoo Sales Tracking at the bottom of the file

<script type="text/javascript">
    _kkstrack = {
     merchantInfo: [{ country:"COUNTRY", merchantId:"COM_ID" }],
      orderValue: '{$sales}',
      orderId: '{$orderid}',
      basket: {$products_json nofilter}
    (function() {
      var s = document.createElement('script');
      s.type = 'text/javascript';
      s.async = true;
      s.src = 'https://s.kk-resources.com/ks.js';
      var x = document.getElementsByTagName('script')[0];
      x.parentNode.insertBefore(s, x);


As you can see, Kelkoo Sales Tracking requires a few details of the order; for Prestashop’s users everything has already been set, the only thing to change are the green values.

  • GREEN VALUES are fixed (static) values to pass along in the tag;
  • COM_ID: This is the unique ID representing your shop within the Kelkoo system. Note that you can log into your Merchant Extranet account and directly use the JS tag generator that will automatically update the code with your COMID. You then just need to copy-paste the code generated and update the other values below.
  • COUNTRY is the 2-letter country code for the country on which your products are listed on Kelkoo:
    • ‘at’ for Austria
    • ‘be’ for Belgium
    • ‘br’ for Brazil
    • ‘ch’ for Switzerland
    • ‘cz’ for Czech Republic
    • ‘de’ for Germany
    • ‘dk’ for Denmark
    • ‘es’ for Spain
    • ‘fi’ for Finland
    • ‘fr’ for France
    • ‘ie’ for Ireland
    • ‘it’ for Italy
    • ‘mx’ for Mexico
    • ‘nb’ for Flemish Belgium
    • ‘nl’ for Netherlands
    • ‘no’ for Norway
    • ‘pl’ for Poland
    • ‘pt’ for Portugal
    • ‘ru’ for Russia
    • ‘se’ for Sweden
    • ‘uk’ for United Kingdom
    • ‘us’ for United States.