Comission are only based on a cookie tracking value.
For example, let suposse there are two affiliates Affiliate1 and Affiliate2 that have tracking1 and tracking2 codes.
If Affiliate1 send a customer to our Opencart the tracking1 code is set in a tracking cookie for 1000 days.
If some days (less than 1000) after Affiliate2 send the same customer to our Opencart using the tracking2 code, the tracking1 code is not removed. I mean that if the customer makes a purchase the comission goes to Affiliate1.
In this 1000 days any purchase made from this customer generates a comission to Affiliate1 unless customer deletes his cookies.
Is a "Who beats the first beats the best" situation that is not common in Affiliate Programs. In my opinion this should be changed.
Code: Select all
// LPCCODER Mod - Change days to 360 and last affiliate get the comision
/*
if (isset($request->get['tracking']) && !isset($request->cookie['tracking'])) {
setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 1000, '/');
}
*/
if (isset($request->get['tracking'])) {
setcookie('tracking', '', 1); // Deletes the cookie
setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 360, '/');
}
// END LPCCODER Mod
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Please let me know your thoughts on this... Thank you.
~al3xandr1a
Newbie / Student
No, it won't delete the cookie, affiliate will still get the commission.al3xandr1a wrote:Say, the customer goes direct to page using the naked URL, will the new code delete his cookie yesterday?
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
I'm sure Daniel states that this is wrong here: http://code.google.com/p/opencart/issues/detail?id=414
And it must be wrong, because Daniel says it is wrong and everyone else does it the way Daniel says is wrong, so it must be wrong because it is not Daniel's way.
So it goes against all the "Open" in "OpenCart" to use the above code, as it is clearly wrong and you are wrong and so are you. Don't you dare use that wrong code.
Ronald Laughton is the worst referee in Rugby League
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
I have a question as I'm working on the same situation. I searched thru my code and found this in my template version:
// Affiliate
$registry->set('affiliate', new Affiliate($registry));
if (isset($request->get['tracking'])) {
setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 1000, '/');
Since that was already in there i just changed the 1000 to 60 for sixty days like this
// Affiliate
$registry->set('affiliate', new Affiliate($registry));
if (isset($request->get['tracking'])) {
setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 60, '/');
I'm just wondering, to achieve only a 60 day cookie, would that be all I need to do since my version already had the initial coding? Or would I still need to add all of the code previously mentioned in this thread above?
Thankful for any advice.
Users browsing this forum: No registered users and 27 guests