knitting

Author Topic: Cart Empty after login - ongoing problem  (Read 1479 times)

jdl777

  • Beginner
  • *
  • Posts: 24
Cart Empty after login - ongoing problem
« on: September 03, 2011, 20:33:17 PM »
I have VM 1.1.7

The issue: new site vistor adds a product or several products to cart, hits proceed to checkout (or logs in if existing customer), and cart is EMPTY.

Recently had a potential customer spend over an hour finding the different items he wanted, only to have his cart emptied when he proceeded to checkout and had to set up an account.

IF you select not to register for an account, the items remain in the cart and it takes you to the next checkout step.

The issue only occurs when you elect to set up an account, or if you log in to your existing account.

PLEASE post any fixes or information on this. It definitely is a costly bug!!

To check out what is happening, add some items to cart and then proceed to set up an account.

http://www.sportsretro.com

Thanks, JD


dylanjh

  • Jr. Member
  • **
  • Posts: 86
    • Lunarhotel.co.uk
Re: Cart Empty after login - ongoing problem
« Reply #1 on: September 07, 2011, 10:38:54 AM »
Look in global config->system. Whats your session handler set to?
Register in Joomla / Virtuemart without a Username (uses email address instead). http://www.lunarhotel.co.uk

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 9470
Re: Cart Empty after login - ongoing problem
« Reply #2 on: September 07, 2011, 10:45:42 AM »
"Banquet Tables Pro"
I do NOT do development work for hire.
My Custom Field Plugin Now with =Price
http://forum.virtuemart.net/index.php?topic=99678
My Shipping Plugin
http://forum.virtuemart.net/index.php?topic=100630.0

info@piecetimepuzzles.com

  • Beginner
  • *
  • Posts: 31
Re: Cart Empty after login - ongoing problem
« Reply #3 on: September 11, 2011, 06:36:38 AM »
Look in global config->system. Whats your session handler set to?

How does the session handler affect things?

I've been having a similar problem - I've tried to disable all registration and accounts but it seems to cause a loop with the customer info & billing info because every time you send the registration it sees that you're not a registered user and brings up the empty form again.  My session handler is set to database.

-Haley

dylanjh

  • Jr. Member
  • **
  • Posts: 86
    • Lunarhotel.co.uk
Re: Cart Empty after login - ongoing problem
« Reply #4 on: September 12, 2011, 09:39:45 AM »
Quote
How does the session handler affect things?

The cart items are stored in the users session variable.
Register in Joomla / Virtuemart without a Username (uses email address instead). http://www.lunarhotel.co.uk

ledstyle

  • Beginner
  • *
  • Posts: 28
Re: Cart Empty after login - ongoing problem
« Reply #5 on: September 14, 2011, 05:08:22 AM »
so what it should be set...this session handler?? and how long session is good?

jamesthecat

  • Beginner
  • *
  • Posts: 24
Re: Cart Empty after login - ongoing problem
« Reply #6 on: October 07, 2011, 12:32:07 PM »
I have exactly the same problem. Anyone find a solution?

BanquetTables.pro you're the mastermind of the forum, any ideas? :'(

jamesthecat

  • Beginner
  • *
  • Posts: 24
Re: Cart Empty after login - ongoing problem
« Reply #7 on: October 07, 2011, 12:38:19 PM »
I found a fix that works for me, go into virtuemart backend > config > security. Ensure site URL and Secure URL include www. in the address.

stAn99

  • Development Team
  • Beginner
  • *
  • Posts: 38
    • One Page Checkout for Virtuemart 2
Re: Cart Empty after login - ongoing problem
« Reply #8 on: July 24, 2012, 04:47:41 AM »
Hello, i was just working on a similar problem at my client on VM2 but this also concenrs VM1. The empty cart is most probably a result of any of these:
CORRUPTION OF THE SESSION
- some part of the script saves an escape character | into the session  (incorrectly encoded shipping on VM1)
- your session size is too small as defined in the database (jos_session, column data is normally of type TEXT which is limited to 64kb)
CHANGE OF THE URL WITHOUT COPYING THE SESSION (cookie path plays role here)

On VM2 the 64kb on my client's system was equivalent to 16 products, in VM1 it may be a little bit more depending on other data being saved in session.

The problem of the empty cart problem after ... (login, going to checkout, etc..) is mostly caused by the session being larger then the 64kb. The solution is to alter the jos_session (change to your prefix) table with this:

ALTER TABLE  `jos_session` CHANGE  `data`  `data` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

Which will change the data type from TEXT (64kb) to MEDIUMTEXT (16mb)

To check your current sizes in your live shop, you can run this sql in the phpMyAdmin which will return number of bytes of the largest data in your session
SELECT MAX(LENGTH(data)) FROM jos_session;

Best Regards,
Stan

VirtueMart Forum

Re: Cart Empty after login - ongoing problem
« Reply #8 on: July 24, 2012, 04:47:41 AM »