VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Lexiboy on March 18, 2012, 11:05:03 AM

Title: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 18, 2012, 11:05:03 AM
I am using VM 2.02 on Joomla 1.7.

When people add product to their card, when the cart is getting bigger than +/- 15 items, it almost always happens that it looses all it's content. This is regardless of whether people are logged in or now.

It also happens when a client uses the back button while viewing his cart
It always happens if someone logs out.

At first I blamed the session timeout, but increasing the session length did not have any effect.

This combined with the problem that I also did not manage to fix the add-to-card problem makes my shop useless for clients, especially the ones that want to buy many items.

I need help! :(
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Milbo on March 18, 2012, 11:29:56 AM
We take a look on it, there is already an other thread about it.
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 18, 2012, 11:39:41 AM
Quote from: Milbo on March 18, 2012, 11:29:56 AM
We take a look on it, there is already an other thread about it.

I just made a screenshot of the problem as it happens, while you see the popup mentioning that items is added to the card, on the small shopping cart you see all the items mentioned with a total under it. But instead of the added item being put on the card, under the total amount and above view card  (Показать корзину) "Cart is empty" (Корзина пуста)  appears.

I added a screenshot. I hope it helps!


(http://www.lemongrasshouse.ru/images/screenshot-empty-after-add.jpg)
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 18, 2012, 11:52:59 AM
Quote from: Milbo on March 18, 2012, 11:29:56 AM
We take a look on it, there is already an other thread about it.

I cannot find the thread, shame on me. Can you link it please?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Milbo on March 18, 2012, 18:14:28 PM
http://forum.virtuemart.net/index.php?topic=99303.0

I changed something, removed some unecessary data from the session. I could now add up to 20 items.
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Sensei2 on March 19, 2012, 19:17:43 PM
But when problem will be solved? In my case only 6 items can be added!!!
We are only two, who has this problem?

Please try: http://elastotechnic.com/index.php/ru/katalog

Can you give us a decesion what to do with it?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Milbo on March 19, 2012, 20:19:47 PM
It is connected to your machine. For me it works with more than 20 items now and I think that should be enough.
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: scotous on March 20, 2012, 12:25:43 PM
i am currently building a site that will need the ability to add more than 20 because it is about colors..
when you say more than 20 you mean 21 or 30+?
its on the svn now?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 20, 2012, 14:18:17 PM
Quote from: Milbo on March 19, 2012, 20:19:47 PM
It is connected to your machine. For me it works with more than 20 items now and I think that should be enough.

Dear Milbo,

What do you mean with 'It is connected to your machine'?

You suggest you changed something on your machine, since it works with more than 20 now (and apparantly not before). Can you please explain or point in the general direction?

Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: scotous on March 20, 2012, 22:29:48 PM
Quote from: Lexiboy on March 20, 2012, 14:18:17 PM
What do you mean with 'It is connected to your machine'?
You suggest you changed something on your machine, since it works with more than 20 now (and apparantly not before). Can you please explain or point in the general direction?

99% He means that he has achieved to fix the issue to his system with allowing more than 20products.

But the thing is that the problem is different in every system...
for example in my system it crashes in 9 products whilst in other systems it crashes at 12 so it is not a local issue..


Edit...I have tried to browse a website on a previous post with VM 2.0.3h (at least thats the version he sais he has) and i succesfully added more than 40 products..has the problem been fixed on svn trunk?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Milbo on March 20, 2012, 23:25:34 PM
The problem is very much lowered. But I found some more,.. it is slowing the cart, but uses lesser Ram/session. The problem is that the session is stored in the db and this is limited.
Title: (Possible solution) Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 21, 2012, 01:15:03 AM
Quote from: Milbo on March 20, 2012, 23:25:34 PM
The problem is very much lowered. But I found some more,.. it is slowing the cart, but uses lesser Ram/session. The problem is that the session is stored in the db and this is limited.

I just went into the Joomla database and changed the 'data' field of the jml_session table from TEXT into MEDIUMTEXT and this seems to solve the problem for me.

It seems that the field data of the jml_session table easily can outgrow the 64k limit of a TEXT field. With just 24 items in the basked the data increased from +/- 10k to over 80k. In a TEXT field that would truncate/destroy the data.

I cannot say this is very efficient... Would it not be much simpler to just save an array with product_id and quantities?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: jaybird2024 on March 21, 2012, 03:44:07 AM
This is just downright absurd, I need way more than 20 products in a cart.
How can we fix it?

My cart dies at 12 items.

data field was set to "mediumtext" when it installed.

Why won't anyone give the answer to fix this?

This version should never have been released with so many quirks. 2.0 Stable my ASS!
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 21, 2012, 09:18:56 AM
Quote from: jaybird2024 on March 21, 2012, 03:44:07 AM
This is just downright absurd, I need way more than 20 products in a cart.
How can we fix it?

My cart dies at 12 items.

data field was set to "mediumtext" when it installed.

Why won't anyone give the answer to fix this?

This version should never have been released with so many quirks. 2.0 Stable my ASS!

Can you tell me how large your data cell grows when you reach like 10 products?

I was surprised that with the debug function I never see that a session takes more than 10-12k while the session data in the database just increases. I wonder if the data accumulates instead of being replaced in that field....
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Sensei2 on March 21, 2012, 18:32:40 PM
People, seems I have found what to do exact.

(http://elastotechnic.com/images/KRT/empty_cart_decesion.png)

Site-Global configuration-Sessions setings-Session handler
Change from "Database" to "None".

Please, make the same and write in forum! Is it really resolved now?
Title: Re: (Possible solution) Re: Shopping Cart emptying after +/- 15 items.
Post by: scotous on March 21, 2012, 21:39:48 PM
Quote from: Lexiboy on March 21, 2012, 01:15:03 AM
I just went into the Joomla database and changed the 'data' field of the jml_session table from TEXT into MEDIUMTEXT and this seems to solve the problem for me.

This seem to worked for me.. no crash for more than 30 products
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Lexiboy on March 21, 2012, 22:04:37 PM
Quote from: Sensei2 on March 21, 2012, 18:32:40 PM
People, seems I have found what to do exact.

(http://elastotechnic.com/images/KRT/empty_cart_decesion.png)

Site-Global configuration-Sessions setings-Session handler
Change from "Database" to "None".

Please, make the same and write in forum! Is it really resolved now?

Will a cookie be used instead?
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Sensei2 on March 23, 2012, 19:08:08 PM
Quote from: Lexiboy on March 21, 2012, 22:04:37 PM
Will a cookie be used instead?

Cookie? It seems, with changing to "none" nothing bad happened with my site, but cart really works now! I can add even 50 items if I want...
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: misscherylb on May 24, 2012, 14:22:38 PM
when I set to 'none' it throws me out of admin and I'm unable to get back in - had to change setting back to 'database' in config file

having the same problem, need to be able to add about 250 products to cart, but keeps emptying while I'm busy...
the database change to "mediumtext" seems to do the trick though!
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: Milbo on August 05, 2012, 10:51:12 AM
Using the tools "update tables if necessary" would have done the trick for you
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: ivus on August 05, 2012, 11:51:59 AM
Hi everyone,

Once again everyone seems to think this is a VM issue. I'm sorry to say, but it isn't. Don't blame VM, blame Joomla!. That's what's causing the session issue.

Everyone knows that VM is built on top of the Joomla! framework. Setting the session storage to none rather than database should fix the problem. Beyond that it could be a server/machine issue as Milbo pointed out. If the session handler configuration doesn't work for you, the next step is to consult your hosting provider.

But ultimately, please remember the separation between Joomla! and VirtueMart. Joomla! affects VirtueMart, but not the other way around.
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: hava on August 10, 2012, 17:04:09 PM
I have the same problem on Joomla! 1.0.15. But I can't find option to set session handler or "update tables if necessary". Can you help me? Thanks

PS. I can't upgrade because this a life website with a lot information. I don't want to have the stress of the end of the week but need to quickly to fix that
Title: Re: Shopping Cart emptying after +/- 15 items.
Post by: jjk on August 11, 2012, 19:00:36 PM
Quote from: hava on August 10, 2012, 17:04:09 PM
I have the same problem on Joomla! 1.0.15. But I can't find option to set session handler or "update tables if necessary". Can you help me?
If you are using Joomla 1.0.15, you are probably using Virtuemart 1.1.x and you posted in the wrong forum section. If you just mistyped the Joomla version and you are using Joomla 1.5.x and Virtuemart 2.x, the "Update tables if necessary" is one of the large buttons at "Tools and Migration".