PDA

View Full Version : Problem with POST Affiliate - Concerned about purchasing Pro


13th May 2004, 03:08 PM
Hello

I have installed your free version. It seems to log clicks fine in the database but it does not mainitain the cookie or session? My site is largely html based so I am not sure the Php Sessions would work anyhow. but the cookie should remain and it does not.

When I go through a sale after having clicked through from an affiliate link the affiliate is not getting credit for the sale. I have put in one line of code to echo the variable asigned to the cookie value and it comes back blank? Any ideas?

The page with the link is the following: http://www.freebizads.ca/LinkToUs.html

You notice that it does keep the session ID for the first click but then it is gone. And if you process a sale (ie by cheque) the affiliate does not get credit?

I am planning on buying the Pro version but if I cant get the free one to do a basic simple sale then I can not validate buying the Pro version.

Please respond ASAP.

Thank you.

Keith Gallant
JustHosting.ca
http://www.justhosting.ca

mark
13th May 2004, 03:31 PM
Hello,

the problem why you cannot read any cookie can be caused by cookie path, or domain.
Cookies are sensitive on from which directory and subdomain you are running the script that wants to read them.

It depends on your site, if you are calling the script from different directory than where you set them, or if you use subdomains, you'll need to change the cookie saving code.

Cookie is set in file affiliate.php, you can replace the code
SetCookie ("ref",$_GET['ref']);
by
SetCookie ("ref",$_GET['ref'], 0, '/');

This should remove the dependency of cookie from path, so cookie will be visible doesn't matter on which directory you'll have the php script.

If you use subdomains, you should put one more parameter
SetCookie ("ref",$_GET['ref'], 0, '/', '.yourdomain.com');

will make cookie available in all of your subdomains.

Hope it helped and you made it work

mark

13th May 2004, 05:40 PM
Excellent

that worked

thank you

2nd June 2004, 09:34 AM
Hi. I'm also evaluating PostAffiliate Free as a test for Pro. And the same situation. I implemented the 'hack' but it doesn't work. I think this is the complication:

Post Affiliate is installed in subdirectory domain/affiliate/
Thank you after sale page is located in a subdomain

I tried to create a test page, with <?PHP include "check1.php"; ?> load it into the sub domain and then test it by accessing the page. Affiliate is not credited with sale. Is there a way around this?

2nd June 2004, 10:02 AM
Hello, I was the one who posted about the subdomain. I found the problem but don't know how to solve it. The thank you page is generated by a php script and the script takes part of the content from a template text file. I put the include check1.php in that text file and apparently that doesn't work. I wonder if there is some other way to include that file?

mark
3rd June 2004, 07:12 PM
Hello,

I believe there will be some way to include it, but I cannot give you any advice you from your brief description.

But I would say you should put the include into PHP file, not into text content.
The problem why it doesn't work can be also in wrong include path.
Include should contain the correct relative or absolute path to the script.
If your thank you page is not in the same directory as check1.php, then only
<?PHP include "check1.php"; ?>
will not work.

You'd have to put relative path there, for example
<?PHP include "../domain1/check1.php"; ?>
and you should correct the file check1.php that also contains some include and set there the same path.

If you'll give me the exact paths to the directory of PA and directory of your thank you page, I can tell you exactly how the path should be.

You can contact me also via email of support form if you don't want to write it in the forum.

with regards,

maros

11th June 2004, 06:20 AM
No, I've made sure the file is correct and the path too... I will email you