Page 1 of 1

OC 1.5, Affiliate link to index page

Posted: Wed Jul 13, 2011 9:18 pm
by Xellz
Is is possible to make a link to home page using affiliate code? I would like to use this to help promote my shop, but i don't see a way to point to shop index page and not to any of my products directly. Anyway everything in cart, even shipping cost is included for calculation affiliate profits, should not be difficult? But i know little about php, so can't figure it out by myself.

Re: OC 1.5, Affiliate link to index page

Posted: Thu Jul 14, 2011 2:48 am
by SXGuy
cart and homepage are way different.

Yes you can generate a link to the homepage and include an affiliate id, but it will do nothing currently.

Affiliate id is only used on the end of a product link, to link the affiliate with the order.

What would be required is a new function which grabs any affiliate id appended to the end of the url link, and apply it to every product link in the store while the customer session is still active.

Re: OC 1.5, Affiliate link to index page

Posted: Thu Jul 14, 2011 3:31 am
by Xsecrets
SXGuy wrote:cart and homepage are way different.

Yes you can generate a link to the homepage and include an affiliate id, but it will do nothing currently.

Affiliate id is only used on the end of a product link, to link the affiliate with the order.

What would be required is a new function which grabs any affiliate id appended to the end of the url link, and apply it to every product link in the store while the customer session is still active.
yeah actually I think this is a huge fail on the affiliate system. It should have used a cookie system. So as long as you come to the store anywhere with that affiliate parameter you get locked in.

Re: OC 1.5, Affiliate link to index page

Posted: Thu Jul 14, 2011 4:56 am
by SXGuy
Xsecrets wrote:
SXGuy wrote:cart and homepage are way different.

Yes you can generate a link to the homepage and include an affiliate id, but it will do nothing currently.

Affiliate id is only used on the end of a product link, to link the affiliate with the order.

What would be required is a new function which grabs any affiliate id appended to the end of the url link, and apply it to every product link in the store while the customer session is still active.
yeah actually I think this is a huge fail on the affiliate system. It should have used a cookie system. So as long as you come to the store anywhere with that affiliate parameter you get locked in.
True, infact i think this is something that needs to be addressed in the future releases, because it would open the possibility of so much more.

You could have a page for affiliates where they could copy banner script codes which have the id embedded, so all a customer need do is follow the banner link to the site and the affiliate id is locked in during the session.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 12:12 pm
by Xellz
Thanks for answers, was a bit busy.

Interesting, i thought it would be possible, since it already uses cookie. I.e. as far as i understand, no matter which product you link to, affiliate will get profit for whole cart. And if person doesn't buy on first visit, but buys during 30 days, affiliate still will get profit.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 4:08 pm
by SXGuy
its not a cookie.

affiliate id's are linked to the end of a product url. for you to share with others in order to receive a commisson.

If you are logged in as an affiliate then yes, all products have your affiliate id. But this isnt the case for a customer. This is just for you to share links to others.

Perhaps you got confused because you logged in as an affiliate and then saw all the product links including an affiliate id

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 4:26 pm
by Xellz
SXGuy wrote:its not a cookie.

affiliate id's are linked to the end of a product url. for you to share with others in order to receive a commisson.

If you are logged in as an affiliate then yes, all products have your affiliate id. But this isnt the case for a customer. This is just for you to share links to others.

Perhaps you got confused because you logged in as an affiliate and then saw all the product links including an affiliate id
What i did to test this, create an affiliate link, log out from affiliate and use this link. After successful order, all products, including shipping were included in affiliate profits.

btw, Daniel confirmed, that it's using cookie in here http://forum.opencart.com/viewtopic.php ... 60#p161152

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 6:26 pm
by Tromas
Xellz wrote:Thanks for answers, was a bit busy.

Interesting, i thought it would be possible, since it already uses cookie. I.e. as far as i understand, no matter which product you link to, affiliate will get profit for whole cart. And if person doesn't buy on first visit, but buys during 30 days, affiliate still will get profit.
What if a customer buys products two times during those 30 days (cookie time).
Will the affiliate get comission for both sales, or only the first sale?

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 7:43 pm
by Xellz
Tromas wrote:
Xellz wrote:Thanks for answers, was a bit busy.

Interesting, i thought it would be possible, since it already uses cookie. I.e. as far as i understand, no matter which product you link to, affiliate will get profit for whole cart. And if person doesn't buy on first visit, but buys during 30 days, affiliate still will get profit.
What if a customer buys products two times during those 30 days (cookie time).
Will the affiliate get comission for both sales, or only the first sale?
Only first. But still don't get, why shipping cost also included in affiliate profit calculation :-\

This kind of promotion is probably one of best for small shops, that's why i really would like it to be more usable than current version. Pointing to a specific product is not really good while using general information banner.

The 1.4.9 version was already really good for my use, only affiliate system was missing.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 9:09 pm
by Tromas

Only first. But still don't get, why shipping cost also included in affiliate profit calculation :-\
Thanks!

As for shipping cost, see: http://forum.opencart.com/viewtopic.php?f=20&t=35143
Easy to fix that! :joker:

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 10:21 pm
by SXGuy
Xellz wrote:
SXGuy wrote:its not a cookie.

affiliate id's are linked to the end of a product url. for you to share with others in order to receive a commisson.

If you are logged in as an affiliate then yes, all products have your affiliate id. But this isnt the case for a customer. This is just for you to share links to others.

Perhaps you got confused because you logged in as an affiliate and then saw all the product links including an affiliate id
What i did to test this, create an affiliate link, log out from affiliate and use this link. After successful order, all products, including shipping were included in affiliate profits.

btw, Daniel confirmed, that it's using cookie in here http://forum.opencart.com/viewtopic.php ... 60#p161152
Ok so i stand corrected regarding cookie, but still, my point remains, you copied the link which has an affiliate link attached, so of course an affiliate will recieve comission from this link.

My point was, that it doesnt carry over to products by just simply including an affiliate id to the end of the home page url, which is what you originally asked.

It should have this function, but doesnt.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 10:51 pm
by Xellz
SXGuy wrote:
Xellz wrote:
SXGuy wrote:its not a cookie.

affiliate id's are linked to the end of a product url. for you to share with others in order to receive a commisson.

If you are logged in as an affiliate then yes, all products have your affiliate id. But this isnt the case for a customer. This is just for you to share links to others.

Perhaps you got confused because you logged in as an affiliate and then saw all the product links including an affiliate id
What i did to test this, create an affiliate link, log out from affiliate and use this link. After successful order, all products, including shipping were included in affiliate profits.

btw, Daniel confirmed, that it's using cookie in here http://forum.opencart.com/viewtopic.php ... 60#p161152
Ok so i stand corrected regarding cookie, but still, my point remains, you copied the link which has an affiliate link attached, so of course an affiliate will recieve comission from this link.

My point was, that it doesnt carry over to products by just simply including an affiliate id to the end of the home page url, which is what you originally asked.

It should have this function, but doesnt.
Why you still think it's not a cookie, if by following link with affiliate code it creates a cookie to follow all other purchases? I.e. first order of any product in shop and not only the linked one?

Of course i know, that simple adding affiliate code to the end of url won't create a cookie. What i thought was if someone can point to piece of code which creates that cookie on product page or it was simply not visible in affiliate menu. May be it's possible to copy that function to main page and catch affiliate link on shop index page. For example by hidden module or something like that. I have only really basic knowledge of php and can't do anything more than a calculator, so can't find it in this complex web of code.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 11:11 pm
by Xellz
Tromas wrote:

Only first. But still don't get, why shipping cost also included in affiliate profit calculation :-\
Thanks!

As for shipping cost, see: http://forum.opencart.com/viewtopic.php?f=20&t=35143
Easy to fix that! :joker:
Thanks, spared me some time to search for this solution :) Looks like it's doing exactly what i wanted.

Re: OC 1.5, Affiliate link to index page

Posted: Fri Jul 15, 2011 11:28 pm
by grgr
Xellz wrote: Of course i know, that simple adding affiliate code to the end of url won't create a cookie.
Why do you know this, it seems from what is written that you have not tried...?

So, as I was wondering this myself and wondering why adding the affiliate code to the end of the URL woudn't work I went in search of where the cookie was set and discovered it in index.php.

Aha me thinks, this must mean that the tracking cookie can be set on any page, I wonder if it works....

So I did this:

http ://localhost/oc150/index.php?route=common/home&tracking=4

And lo, a tracking cookie was set!

Not wishing to get ahead of myself however, I tried out an order....
Orders.JPG

Orders.JPG (14.53 KiB) Viewed 4002 times

This was a 30 second test on localhost, so maybe it doesn't work like this in reality?

Re: OC 1.5, Affiliate link to index page

Posted: Sat Jul 16, 2011 12:13 am
by Xellz
grgr wrote:
Xellz wrote: Of course i know, that simple adding affiliate code to the end of url won't create a cookie.
Why do you know this, it seems from what is written that you have not tried...?

So, as I was wondering this myself and wondering why adding the affiliate code to the end of the URL woudn't work I went in search of where the cookie was set and discovered it in index.php.

Aha me thinks, this must mean that the tracking cookie can be set on any page, I wonder if it works....

So I did this:

http ://localhost/oc150/index.php?route=common/home&tracking=4

And lo, a tracking cookie was set!

Not wishing to get ahead of myself however, I tried out an order....
Orders.JPG
This was a 30 second test on localhost, so maybe it doesn't work like this in reality?
That's what exactly i was asking for, even with all this sarcasm, thanks for the solution.

Obviously you didn't simply add affiliate code to the end, but actually found what will parse tracking code. Thanks again, this was the only missing piece for my shop. It's more like part of hobby, so i'm doing everything myself, though little bit difficult without proper programming knowledge.

Re: OC 1.5, Affiliate link to index page

Posted: Sat Jul 16, 2011 5:43 am
by Tromas

Only first. But still don't get, why shipping cost also included in affiliate profit calculation :-\
Hmm, did some testing, and the +comission button appears on the second test order too. ???
Yes, I have confirmed payment, and paid out comission for the first order.

Can it be that commission is triggered for all orders within 30 days ?

Re: OC 1.5, Affiliate link to index page

Posted: Sat Jul 16, 2011 12:01 pm
by Xellz
Tromas wrote:

Only first. But still don't get, why shipping cost also included in affiliate profit calculation :-\
Hmm, did some testing, and the +comission button appears on the second test order too. ???
Yes, I have confirmed payment, and paid out comission for the first order.

Can it be that commission is triggered for all orders within 30 days ?
Somehow shop on localhost started to behave quite weird. After few test orders it stopped completely picking up affiliate code. After i tried in IE, several orders in a row received affiliate bonus without following link with code. Before that i've tried in firefox and it worked only for first order. But now i can't get it to work at all in both browsers ???

Wonder what's up with my server. Going to upload it to my web hosting and check it there if it still works same. Sigh, one problem solved, another appeared :)

Re: OC 1.5, Affiliate link to index page

Posted: Mon Aug 08, 2011 10:36 pm
by SXGuy
It seems theres a few different questions in this topic all being jumbled up together.

I am at a loss now, as to what you have and havent discovered regarding affilite id's being passed via the homepage url. lol

Re: OC 1.5, Affiliate link to index page

Posted: Tue Aug 09, 2011 12:31 am
by grgr
Well the original question was 'can I add the tracking code to the home page link'.

I tried this:

http ://localhost/oc150/index.php?route=common/home&tracking=4

Which seems to work. So the answer is that yes, you can add the tracking link to the homepage link but the link must be as above rather than directing to plain old domain.com or domain.com/folder.

It was only a quick test on localhost but see no reason why it won't work on a live server.

Re: OC 1.5, Affiliate link to index page

Posted: Sat Jun 02, 2012 3:48 pm
by grduniam
Yes it does work so that the affiliate gets paid commission on any or all products that are bought once their cookie is planted from any link containing their tracking ID.

My extension adds the homepage link with affiliate ID attached to it if you want this. See it here: http://www.opencart.com/index.php?route ... on_id=6688