Integrate affiliate tracking codes in Prestashop
Hi,
I’ve opened now my first online shop and quickly the question came up… how to find customer. Or who could help me with it.
Quickly I found one possible answer… affiliate marketing. It’s anyway my preferred method from all I know and for which my wallet is big enough. Everything else is not economical or just to expensive… most both.
So, I started a campaign at my favorite affiliate network. And then the big question… how to integrate the tracking code in my Presta shop system? :o
That is not so easy, because there are variables to send.
Luckily we have the internet. :) And I found the answer in a forum. Here the quote summary of PaoloPinkel:
1.) Add this to the init.php:
@session_start(); if(Tools::getValue('belboon')){ $_SESSION['belboonSession'] = Tools::getValue('belboon'); }
2.) And this to the order-confirmation.php:
$smarty->assign('belboon',$order->getTotalProductsWithTaxes()); $smarty->assign('belboonSession',$_SESSION['belboonSession']);
3.) The code from Belboon has to be added into the order-confirmation.tpl. In this sniped you need to replace NETTOWARENWERT (sorry, don’t know what is written in the english version ‘Net value’?) with {$belboon}, ORDERCODE with {$id_order} and xxxx,yyyy with {$belboonSession}.
That’s it. If you have to transfer VAT then you have to reduce it from getTotalProductsWithTaxes() somehow. Else they pay to much commission.
(Quote from http://www.homepage-community.de/…)
PaoloPinkel is using the affiliate network Belboon. I use a different network. But the concept is the same. You just need to customize the variables.
Thank you to PaoloPinkel and Chris.
Best wishes
Gordon
Leave a Reply
Want to join the discussion?Feel free to contribute!