Jump to content



* * * * * 1 votes

Shopping cart empty when checkout is clicked


This topic has been archived. This means that you cannot reply to this topic.
45 replies to this topic

#-19   canman

canman
  • Members
  • 9 posts

Posted 12 August 2003 - 10:02 PM

Hi People!

I am having a wierd problem that did not exist, pre-MS2. I installed a new site, with MS2. I can add things to my cart, etc. When I click checkout, it says that my shopping cart is empty!  I can then click the continue button to see that in fact my items are still in the cart.

It seems rather strange that something like this is happening. I have not changed any of the code... this is a stock installation so far.

Any assistance would be appreciated. Hopefully it is something small, funny, and silly.

Thanks!

#-18   CThru

CThru
  • Members
  • 2 posts

Posted 19 August 2003 - 08:19 PM

I have developed the same problem on a MS2.2 install after installing the Purchase No Account contribution.  I've dug through code looking for the answer, but so far no dice.

#-17   canman

canman
  • Members
  • 9 posts

Posted 19 August 2003 - 10:13 PM

Well... I don't know if this will help... but I realized that the shopping cart was considered empty as soon as the site jumped to the SSL pages... as if the cookie (or whatever it is that persists the cart data) was not being passed properly.

I didn't bother to fix it yet... all I did was turn off SSL... and the problem is gone.

Not really a solution unless you don't use SSL.

#-16   tksystems.co.uk

tksystems.co.uk
  • Members
  • 19 posts

Posted 20 August 2003 - 12:08 AM

how do u turn of ssl ?

#-15   canman

canman
  • Members
  • 9 posts

Posted 20 August 2003 - 07:38 AM

Just set ENABLE_SSL to false in includes/configure.php.

Keep in mind this means that your https:// server will no longer be used.

#-14   tksystems.co.uk

tksystems.co.uk
  • Members
  • 19 posts

Posted 20 August 2003 - 10:23 AM

tried that still looks for https

#-13   paulgrimes

paulgrimes
  • Validating
  • 42 posts

Posted 20 August 2003 - 10:28 AM

I'm having the same problem

- Click on 'continue to cart' and the cart is empty
- If I click 'continue' again, I'm logged out of the shop, and the product is displayed in the cart!
- When I log back in, and place another order, the same thing happens, but accumulates products in the (logged out) shopping cart

anyone help?

PaulG

#-12   paulgrimes

paulgrimes
  • Validating
  • 42 posts

Posted 20 August 2003 - 11:07 AM

I did some testing on it, and found out the following (note that this occurs on my store, perhaps not yours):

- If a customer places an order that is successful, then returns to the site to place either a supplementary order, or a completely new order of a different product, The shopping cart shows up zero.

Which would basically allow peolpe to place one, and only one order, on my site!

arrgh!

Hopefully someone can shed light on this.
PG

#-11   CThru

CThru
  • Members
  • 2 posts

Posted 20 August 2003 - 07:08 PM

Well, the problem with the cookies not being transferred to SSL has to do with using your host's shared SSL key.  Cookies cannot transfer domains, so you loose your shopping cart when moving to secure.  One solution is to buy your own SSL certificate for your domain.  Another is to disable cookies, which of course leads to the osCsid=blahblahblah returning.  Luckily, it only appears after you place something in the cart, so probably search engines won't pull these up on all your pages when crawling.  However, this itself (as other people on the forums have stated) leads to security issues with people jacking sessions via the session ID and adding things to other peoples carts, if you want to consider that a problem.

These same questions are on many many many threads, with people purposing lots of solutions, but I have yet to see anyone say "Eureka!  I've got it!" and explain how to make everything nice.  I mean, I was under the impression that osCommerce worked really well with shared SSL certificates.  It's a large part of why I initially decided to use it. :(

#-10   NorthStar

NorthStar
  • Members
  • 95 posts

Posted 27 August 2003 - 08:24 PM

Quote

I mean, I was under the impression that osCommerce worked really well with shared SSL certificates. It's a large part of why I initially decided to use it.

I use 2.2 MS2  under a shared cert and so far its working great!   But my http:  and https:  are identical URL's except for the protocol type.

I also installed a Verisign cert after wasting much time with other brands - couldnt get *anything* to work under a chained certificate.  Of course I could always sign my own cert - but then microsoft browsers sometimes say "page cannot be displayed"  yadahyadahyadah.  guess i wondered off the subject here.    

osc is the best ever cart!

#-9   decursus

decursus
  • Members
  • 1 posts

Posted 26 November 2005 - 06:07 AM

Found a solution that worked for me, might not apply to your situation, however.  I had the same error (cart becomes empty when user goes from an unsecure (http:// ) page to a secure one (https:// )

In my catalog/includes/configure.php file:

  define('HTTP_SERVER', 'http://www.thekarmaforest.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://www.thekarmaforest.com'); // eg, https://localhost - should not be empty for productive servers

I had extra slashes ( / ) after the web address for both the HTTP_SERVER and HTTPS_SERVER like so:

define('HTTPS_SERVER', 'https://www.thekarmaforest.com/');

This caused the page to load as:  https://www.thekarmaforest.com//catalog/.. etc

removing this slash kept the contents of the cart intact!

Don't as me why though =)

#-8   kawie95

kawie95
  • Members
  • 40 posts

Posted 19 March 2007 - 12:28 AM

That didn't work... Is my cookie path right?
	define('HTTP_SERVER', 'http://toneworkmediamusic.c4.ixwebhosting.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://toneworkmediamusic.c4.ixwebhosting.com'); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'toneworkmediamusic.c4.ixwebhosting.com');
  define('HTTPS_COOKIE_DOMAIN', 'toneworkmediamusic.c4.ixwebhosting.com');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
Nothing stays in my cart :(

Edited by kawie95, 19 March 2007 - 12:30 AM.

-Eric Schrader

#-7   kawie95

kawie95
  • Members
  • 40 posts

Posted 23 March 2007 - 07:07 AM

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

FIXED IT!!!

admin/includes/configure.php:
 define('HTTP_SERVER', 'https://toneworkmediamusic.c4.ixwebhosting.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
  define('HTTP_CATALOG_SERVER', 'https://toneworkmediamusic.c4.ixwebhosting.com');
  define('HTTPS_CATALOG_SERVER', 'https://toneworkmediamusic.c4.ixwebhosting.com');
  define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

My hosting company changed the cookie domain to '' and now it works!!!! TRY IT!
Here's what they said my problem was:

Quote

In order to use shared ssl, your oscommerce site should be running at


http://toneworkmediamusic.c4.ixwebhosting.com and the oscommerce site has to be accessed at

http://toneworkmediamusic.c4.ixwebhosting.com only when using shared ssl, that's why please be sure to make following changes in toneworkmedia.com/catalog/includes/configure.php :
define('HTTP_SERVER', ''); to define('HTTP_SERVER', '

http://toneworkmediamusic.c4.ixwebhosting.com');
define('HTTPS_SERVER', ''); to define('HTTPS_SERVER', '

https://toneworkmediamusic.c4.ixwebhosting.com');
define('ENABLE_SSL', false); to define('ENABLE_SSL', true);

-Eric Schrader

#-6   ioasw

ioasw
  • Members
  • 27 posts

Posted 28 March 2007 - 04:31 AM

I am having the exact same issues you where having, can you post your before and after configure.phps?  I am having trouble understanding your directions, I don't know maybe I'm tired.

#-5   vincea

vincea
  • Members
  • 3 posts

Posted 28 March 2007 - 03:17 PM

I had the EXACT same problem and had to put my client on hold for awhile before someone came up with a soluton. decursus you rock!

#-4   cheeseandrice

cheeseandrice
  • Members
  • 47 posts

Posted 31 March 2007 - 07:44 PM

View Postvincea, on Mar, 03:17 PM, said:

I had the EXACT same problem and had to put my client on hold for awhile before someone came up with a soluton. decursus you rock!

Me too

#-3   cheeseandrice

cheeseandrice
  • Members
  • 47 posts

Posted 31 March 2007 - 08:37 PM

View Postcheeseandrice, on Mar, 07:44 PM, said:

Me too

Ok I got it TOO!!!! IT IS A config.php mis configuration...I tried to explain it all here
http://forums.oscommerce.com/index.php?showtopic=257116

#-2   staaf

staaf
  • Members
  • 21 posts

Posted 15 May 2007 - 11:50 AM

View Postcheeseandrice, on Mar 31 2007, 10:37 PM, said:

Ok I got it TOO!!!! IT IS A config.php mis configuration...I tried to explain it all here
http://forums.oscommerce.com/index.php?showtopic=257116

the thing you suggested isnt a good solution, the only thing you do is rederecting everything to SSL....
Im having the problem too, trying to solve it the whole day. Just cant seem to find a solution.

it just goes back to a other session when switching to HTTPS and switching back to HTTP.....

the sessions or cookies or whatever, dont exactly know how it technicaly work but anyways, that should be in a map accessed from both configure files in to the same directory. But i dont know how to configure that...

just my 2 cents... cheers

#-1   trevb54

trevb54
  • Members
  • 159 posts

Posted 22 May 2007 - 08:44 PM

View Poststaaf, on May 15 2007, 09:50 PM, said:

the thing you suggested isnt a good solution, the only thing you do is rederecting everything to SSL....
Im having the problem too, trying to solve it the whole day. Just cant seem to find a solution.

it just goes back to a other session when switching to HTTPS and switching back to HTTP.....

the sessions or cookies or whatever, dont exactly know how it technicaly work but anyways, that should be in a map accessed from both configure files in to the same directory. But i dont know how to configure that...

just my 2 cents... cheers

I too have this problem although without even going to HTTPS. I click on an item and there is nothing there, not even when I click on continue???

Trev

#0   fneil2000

fneil2000
  • Members
  • 1 posts

Posted 29 May 2007 - 11:12 AM

Hi..
I have exactly the same problem as trevb54. I click on a ADD TO CART button and then it redirects me to my shopping cart, telling me "Your shopping cart is empty !". I don`t run on a HTTPS server, all my orders are running on HTTP, so, from what i`ve read, it can't be from the configure.php.

I need urgent help !!
PLEASE HELP ME
Thanks in advance