Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart vanishes on checkout?


CorpBoy

Recommended Posts

I've got a pretty weird problem. When I first open the catalog site and add something to my cart, everything looks fine. If I continue shopping everything looks normal.

 

But if I go to checkout, and I'm not logged in, I get re-directed to the login page and my shopping cart suddenly becomes empty.

 

If it matters when I added the item to the cart I was in non-SSL mode, but when I go to the login page SSL kicks in.

 

Anyone have any ideas?

 

To make matters worse, if I log-in it sends me to the empty shopping cart page. When I hit continue from there I'm back in non-SSL mode, and my shopping cart re-appears.

Link to comment
Share on other sites

Did you do anything special to get ssl workin? Do you get a solid padlock in ssl?

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Did you do anything special to get ssl workin? Do you get a solid padlock in ssl?

I'm not sure what you mean by "anything special", but I do get a solid padlock in SSL.

 

I noticed that if I log in I get a "Welcome back Paul" message, but if I go looking at any products I drop back into non-SSL mode and it makes me log in again.

 

The more different things I try the more it looks like some kind of weird session-related problem.

Link to comment
Share on other sites

You probably just have an error in your cookie domain settings in catalog/includes/configure.php and you're losing your sessions.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

You probably just have an error in your cookie domain settings in catalog/includes/configure.php and you're losing your sessions.

Hmm. I don't see anything blatently wrong, but then again I'm still pretty new to this.

 

Do you see anything wrong (mydomain.com substituted here in place of my actual domain name)

 

define('HTTP_SERVER', 'http://mydomain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://mydomain.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', 'mydomain.com');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');

Link to comment
Share on other sites

ok, I added "www" to the domain variables and it looks like it is working now.

 

I'm having the same problem, and unfortunately for me just adding www to the domain variables didn't fix anything. What's even more odd, if I set the "Force Cookie Use" in the admin screen to true, I get a message telling me that I need to enable cookies (even though I have my browser set to accept all cookies). I even tried this with IE (I was using Mozilla) set up to accept all cookies as well, and still got the same message.

 

My configure.php (the first few lines anyway) look the same as CorpBoy's.

 

I'm relatively new to this, and while I do have a programming background I can't figure this out for the life of me. Help please!

Link to comment
Share on other sites

You can't use force cookies with shared ssl. See:

 

http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=742207

 

Second, did you do anything special in application_top.php to get your shared ssl working correctly with a solid padlock?

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

You can't use force cookies with shared ssl. See:

 

http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=742207

 

Second, did you do anything special in application_top.php to get your shared ssl working correctly with a solid padlock?

 

Didn't change anything in application_top, and mysteriously now it started working (although I did clear my cookies, maybe there was a corrupted cookie or something in there). Everything seems to be working fine now as far as that goes, although I do have one other question - sometimes I get a cookie ID tacked onto the end of the URL, sometimes I don't. Not sure if I should be worried about that...

 

However, I am still having a problem getting my admin area to work with SSL. The first admin page comes up protected, but then when I click on any other link it goes back to the un-secure version.

Link to comment
Share on other sites

In your admin/includes/configure.php set:

 

define('HTTP_SERVER', '');

 

to your https address, not the http one.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...