View Full Version : variables on join page
dingle
17th August 2004, 05:18 PM
I need to have some variables passed to my join page...
Sorry if this is such an easy question, but what is the name of the cookie the affiliate ID is called? (so i can call it via php on the join page)
mark
19th August 2004, 07:29 PM
Hi,
If you are talking about free version, the cookie name is 'ref' and it contains ID (name) of affiliate.
For commercial version it is 'POSTAff2Cookie' by default (you can change it in /settings/global_const.php, although there is no reason to do it).
It commercial version it contains ID of affiliate and ID of product category separated by '_', for example 2_1.
In the Paypal section of Integration document it is described how to get the cookie value using PHP or JavaScript (for non php pages).
If you want to get one of those IDs from the cookie value, you can use the folowing PHP code to split it to parts:
$arr = split ( '_', $_COOKIE['POSTAff2Cookie']);
$affiliateID = $arr[0];
$campaignID = $arr[1];
hope it helped,
mark
dingle
21st August 2004, 07:14 PM
I inserted the code you gave me on the join page (which is php)
and i cant make the cookie "work"..
after your code, i put echo $affiliateID to see if it would show
but no go...
also tried to print the cookie by itself and that did not work
is there some way to see if its being passed or exists? maybe thats where im going wrong?
mark
22nd August 2004, 12:11 AM
Hi,
if you put
echo 'Cookie value='.$_COOKIE['POSTAff2Cookie'];
and it will not write any value, it means the cookie is empty.
regards,
mark
dingle
22nd August 2004, 04:21 PM
ok .. well it's not setting the cookie..
I have not changed the cookie name or any other value that may stop it from being set...
Any ideas?
clicks do register for the affiliate id
dingle
22nd August 2004, 04:44 PM
btw:
I am using the latest version (PRO) with both fixes applied..
mark
23rd August 2004, 09:33 PM
Hi,
On some configurations, saving of cookies will start working works after you change the redirect code.
Go to /scripts/ClickRegistrator.class.php and replace the line
Header('Location: '.$this->destinationURL);
with
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=".$this->destinationURL."\">";
It should be around line 250.
Then try again. If the cookies are not saved even now, then the problem must be in your browser's security settings or firewall.
hope it helped,
Mark
dingle
23rd August 2004, 10:25 PM
Still doesn't work for some reason - I set my own cookie on the main page to see if it would carry it to the join, which it did..
I'm just going to hardlink every page to carry the product and affID variables to the join ...then agian it would be easier to set my own cookie with the same vars and call it from the join..?
Would there be any disadvantages doing this? (apart from not having control over the cookie length in the admin area)
- dingle
mark
23rd August 2004, 10:36 PM
Hi,
there should be no disadvantage if you set the cookie by yourself.
But why is it not working?
Don't you call the click registering code from different subdomain? Cookies are sensitive on this.
Otherwise, with the code I described before there is no reason why it should not work..
regards,
mark
dingle
24th August 2004, 09:37 AM
Hi,
there should be no disadvantage if you set the cookie by yourself.
But why is it not working?
Don't you call the click registering code from different subdomain? Cookies are sensitive on this.
Otherwise, with the code I described before there is no reason why it should not work..
regards,
mark
What do you mean by calling it from different sub domain?
I'm using the (new) style to register clicks (domain.com/?a_aid=1&a_bid=2) .. does the name of the site in the admin area need to match the actual domain name?
The admin pages are ont a differnt domain than the actual domain I am sending the clicks to...
scripts on; domain1.com/merchants
sending to: domain2.com/?a_aid=1&a_bid....
Where does it need to be the same?
mark
24th August 2004, 10:27 AM
Hi,
when you register cookie by running a script in domain1.com, then you can read it only by scripts also runing on domain1.com.
It will not work if you'll set cookie in www.domain1.com, and then call
www.domain2.com/affiliate/scripts/sale.php?... during sale registration because it will not find the cookie (because of another domain).
If you are using new style of linking, and you have different domains, maybe this creates problem with cookies.
When you have your shop on www.domain1.com, and affiliate system installed on www.domain2.com,
you should add the code from the Integration page in merchant panel to every destination page of www.domain1.com (shop site) which will call www.domain2.com/affiliate/scripts/t2.php?a_aid=XXX&a_bid=YYY (in affiliate system site).
This way cookie will be saved under www.domain2.com and can later be recognized if you'll call
www.domain2.com/affiliate/scripts/sale.php?...
hope it is clear
mark
dingle
24th August 2004, 04:13 PM
Hi,
when you register cookie by running a script in domain1.com, then you can read it only by scripts also runing on domain1.com.
It will not work if you'll set cookie in www.domain1.com, and then call
www.domain2.com/affiliate/scripts/sale.php?... during sale registration because it will not find the cookie (because of another domain).
If you are using new style of linking, and you have different domains, maybe this creates problem with cookies.
When you have your shop on www.domain1.com, and affiliate system installed on www.domain2.com,
you should add the code from the Integration page in merchant panel to every destination page of www.domain1.com (shop site) which will call www.domain2.com/affiliate/scripts/t2.php?a_aid=XXX&a_bid=YYY (in affiliate system site).
This way cookie will be saved under www.domain2.com and can later be recognized if you'll call
www.domain2.com/affiliate/scripts/sale.php?...
hope it is clear
mark
ok thanks ... I got all that.. testing it out now..
on another note... any ETA on the update that tracks by session/ip? :)
quillspirit
24th August 2004, 11:07 PM
What kind of issue would using parked domains bring up, if any?
For example, I have getabetterhost.net and getabetterhost.com parked under quillspirit.net
quillspirit.net is my "parent" site... if somebody originally came in through a parked domain, and then later came back to order from my main url, would it credit the sale to the affiliate?
mark
25th August 2004, 09:12 PM
Hi,
the only issue is that you have to be careful about the domain where the two scripts for save and read of cookies are located. They must be on the same domain address.
Normally, it should not be a problem, because scripts are usually included as invisible images and they are called from the one domain (where you have affiliate system installed).
You have to be careful only if you set cookies by yourself for some reason.
with regards,
mark
Greenman
22nd September 2004, 10:52 AM
Hi Mark
Using the PRO version can I place the sign up forms on the commercial website www.tidy.co.il and also on an affiliate website www.sustainableaffiliates.com.
The affiliate login will however be only on the www.tidy.co.il website.
Thanks a lot
Greenman
Greenman
22nd September 2004, 12:21 PM
Hi again,
So, can I do it? Can I have a sign up form on say one site and the full affiliate program with the sign up form on another?
Also, why would I want to set cookies by myself?
Thank you,
Greenman
Greenman
22nd September 2004, 03:30 PM
Hi,
And one other thing please - can the program work in Hebrew for affiliates - forms, affiliate login menu, update forms, etc.
Thanks a lot
Greenman
Greenman
22nd September 2004, 03:58 PM
Hi Mark
One other question please -
Can the affiliate program interface for the affiliate (sign up forms, affiliate login menu and interface, etc) be translated into Hebrew and can the dbase store and handle data in Hebrew?
Thanks again,
Greenman
mark
23rd September 2004, 05:57 PM
Hi Greenman,
yes, you can have signup forms on multiple domains. The single site license restricts only installation of the system to one domain.
The language can be translated to Hebrew, there is language file (in /langs directory) that you have to translate. It contains text strings for whole system (affiliate + merchant control panel).
You can just copy the language file to new name (for example hebrew.php) and translate all text strings inside. Then set this language as default in Settings in merchant panel.
In addition to this you'd also have to translate the signup page, there are just few text strings.
Database also should be able to handle Hebrew data. It depends on the database settings, but I don't expect any problem with this.
regards,
Mark
Greenman
26th September 2004, 03:09 PM
Hi Mark,
Just want to say thank you very much at this stage! :D
Greenman
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.