Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy now button not working. Session or code problem?


knifeman

Recommended Posts

Posted

Hi all,

 

Hope you can put up with me asking another question. I am on my third store and thought I was getting pretty good, but it seems like this one has really tried me. Actually this store at prankit.net is a copy of my first site. I added header tags and changed a few images is all.

 

I don't know when this problem arose. It may have been there for awhile or it may have happened since installing header tags. I am not sure. I also had a few problems with application_top last night, but those should be fixed.

 

Now for the problem:

This site has no PWA installed. If you enter the site and click buy now, it takes you to the shopping cart page and says cart empty. If you log in it is still empty.

 

If you enter the site and log in, click buy now, you still get the empty shopping cart page and you are logged off. If you log in again, the item is in your basket.

 

The add to cart buttons work fine, only the buy now is broken. Could someone please point me to the correct area. Is this sessions, cookies, or product listing, or something else.

 

Buy now is turned on for awhile if someone wants to go see the site:

My Webpage

 

Session Directory /tmp   
Force Cookie Use False   
Check SSL Session ID False   
Check User Agent False   
Check IP Address False   
Prevent Spider Sessions True   
Recreate Session False

This is the same as my original site that is still working.

 

Thanks,

Tim

Posted

In your SEO url settings, try changing

 

Output W3C valid URLs (parameter string)?

 

to FALSE

 

It's changing the & in the url to "& a m p" ...that messes up the link

Posted
In your SEO url settings, try changing

 

Output W3C valid URLs (parameter string)?

 

to FALSE

 

It's changing the & in the url to "& a m p" ...that messes up the link

Thanks so much for looking at this Mark.

 

I turned SEO URL off completely and buy now works. I thought I had tried this last night. Anyway, is the parameter you want me to change in admin or in a file, cause I did not see it in admin.

 

I just now noticed that my oscid never goes away from the URL whether seo is on or off. This is not right either is it?

 

Tim

Posted

The w3c url setting should be in your admin panel, under configuration>>seo urls

 

Newer versions of seo urls have that setting, earlier ones don't. I use 2.1d, and it has the settting. I upgraded to that to fix the same problem, and I haven't had any trouble since. Upgrading to 2.1d is pretty quick and easy, just replacing one file and changing the .htaccess file.

 

Yes, not being able to lose the SID is not right. If cookies are enabled in your browser, the SID should disappear after a couple of clicks. I would suspect the cookie settings in your configure.php file aren't quite right. BTW, I noticed the same thing on your site...so I would suggest looking at the includes/configure.php

Posted
The w3c url setting should be in your admin panel, under configuration>>seo urls

 

Newer versions of seo urls have that setting, earlier ones don't. I use 2.1d, and it has the settting. I upgraded to that to fix the same problem, and I haven't had any trouble since. Upgrading to 2.1d is pretty quick and easy, just replacing one file and changing the .htaccess file.

 

Yes, not being able to lose the SID is not right. If cookies are enabled in your browser, the SID should disappear after a couple of clicks. I would suspect the cookie settings in your configure.php file aren't quite right.

I have accept cookies from prankit.net in my browser and my catalog configure.php looks like this:

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://prankit.net'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://prankit.net'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'prankit.net');
 define('HTTPS_COOKIE_DOMAIN', 'prankit.net');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

Tim

Posted

I have turned off SEO URL. So my buy now buttons work, but the OSC ID stays in the URL. I have compared my configure.php to my original site and can't seem to see the difference. Everything I have read tonight about the id has been cookies paths wrong in the configure file. Does anyone see what is out of place?

 

Tim

Posted

I don't know...your cookie settings look ok to me, but your site doesn't seem to set any cookies. :huh:

 

You might look at application_top again...

 

Did the oscid problem just start, or you're not sure?

Posted
I don't know...your cookie settings look ok to me, but your site doesn't seem to set any cookies. :huh:

 

You might look at application_top again...

 

Did the oscid problem just start, or you're not sure?

I really appreciate the time you put into this one Mark,

 

To be honest, I have not paid any attention to the url until you mentioned the ampersand problem. I believe I am going to uninstall AGAIN, the header tags. It has been nothing but grief and isn't quite right yet. Then I will see what the OSCID and SEO URL mod will do by theirselves.

 

Tim

Posted

For those keeping up with this thread, I have some new details.

 

Deleted header tags no difference. I still have SEO URL off so buy now buttons will work. OSCID never goes away. AH, but it does work correctly in admin. First click and ID shows up. Second click and it disappears as it should. My session settings and configure php are the same as I already posted.

 

If I don't get any suggestions overnight, I guess I will start from scratch Monday.

 

Tim

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...