VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: oleg_4vm on September 27, 2019, 18:48:19 PM

Title: shopping cart lifetime
Post by: oleg_4vm on September 27, 2019, 18:48:19 PM
Hi, all!

Can't find the lifetime of a shopping cart in the virtuemart settings. May be anybody can help me?
Title: Re: shopping cart lifetime
Post by: StefanSTS on September 27, 2019, 19:16:02 PM
Check the session lifetime in Joomla configuration, tab 2.

Default is 15 minutes, you might want to set that higher.
Title: Re: shopping cart lifetime
Post by: oleg_4vm on September 27, 2019, 19:26:21 PM
Quote from: StefanSTS on September 27, 2019, 19:16:02 PM
Check the session lifetime in Joomla configuration, tab 2.

Default is 15 minutes, you might want to set that higher.

Hm. I thought about this. But i left my browser tab open for a 30 min and after this refreshed the page and my shopping cart is stay intact.
So, i concluded that session lifetime in Joomla isn't related to shopping cart lifetime.
Was my experiment wrong :-)?
Title: Re: shopping cart lifetime
Post by: StefanSTS on September 27, 2019, 20:32:01 PM
There is a keepalive script working, so if your browser tab is open, the keepalive will do it's work.
Title: Re: shopping cart lifetime
Post by: oleg_4vm on September 27, 2019, 20:48:23 PM
Quote from: StefanSTS on September 27, 2019, 20:32:01 PM
There is a keepalive script working, so if your browser tab is open, the keepalive will do it's work.

Hm. Thus, while i keep tab open my shopping cart is alive and after browser tab close a shopping cart live 15 min, right?
Title: Re: shopping cart lifetime
Post by: Jörgen on September 28, 2019, 11:53:12 AM
Try testing, i will cost you approx ,20 minutes.
Jörgen @ Kreativ Fotografi
Title: Re: shopping cart lifetime
Post by: oleg_4vm on September 29, 2019, 08:38:57 AM
Thank everybody for the help!
Title: Re: shopping cart lifetime
Post by: GJC Web Design on September 29, 2019, 13:00:50 PM
and you could do other things while waiting...  :P
And the answer was?

The point of this forum is the exchange of information and the increase of knowledge.....
If someone Googles this post they will be none the wiser...
Title: Re: shopping cart lifetime
Post by: oleg_4vm on September 30, 2019, 14:04:45 PM
Quote from: GJC Web Design on September 29, 2019, 13:00:50 PM
and you could do other things while waiting...  :P
And the answer was?

A session is infinite while a tab is open and after closing expire after joomla session lifetime.
StefanSTS said about this above.
Title: Re: shopping cart lifetime
Post by: GJC Web Design on September 30, 2019, 14:05:20 PM
Thank you for confirming
Title: Re: shopping cart lifetime
Post by: WebStuff on February 27, 2020, 20:51:18 PM
Not quite true in my case if the order has got to the stage of being written to the DB, i.e. in a pending state, then the cart will be re-populated by the saved DB details if the same user logs on.
At least in my case this is true. I have had test orders that were in pending state in the DB from months ago be added to the cart. Unless this is some other browser setting?
Title: Re: shopping cart lifetime
Post by: GJC Web Design on February 27, 2020, 22:47:59 PM
No -- this is separate from sessions etc -- if the cart is abandoned it is written to the  designated cart table so that it can be reloaded when that user logs on again.
Title: Re: shopping cart lifetime
Post by: kess on October 16, 2020, 11:20:07 AM
Hello

but the data stored in the cart and in the db have an expiry date?

I have the problem that registered user returns after a few days
and the cart is empty.

what can be the reason?

Thanks for your help
Title: Re: shopping cart lifetime
Post by: AH on October 16, 2020, 12:54:10 PM
cart data stored in the cart table for registered users does not expire
Title: Re: shopping cart lifetime
Post by: ermes on October 19, 2020, 16:10:00 PM
Another question about this topic: if i login with "remember me" active and i close the browser without login, when i return on the website i'm already logged in but the cart is empty. How can i fix this bug? My customers close the cart after weeks (b2b shop).
Can you help me please?
Title: Re: shopping cart lifetime
Post by: AH on October 19, 2020, 17:12:16 PM
It is not a bug it is based on session lifetime and keeping "cart" alive

Sessions expire when browser is closed or website is exited - the session expires and cart is empty.

For registered logged in customers, cart details are stored in a carts table - if the customer does not complete an order and later logs into their account - the details of the last non completed cart are loaded

If the customer wants to save a cart for later use maybe you can invoke some cart saver functionality outside of that already provided for by core VM and registered logged in customers
Title: Re: shopping cart lifetime
Post by: ermes on October 19, 2020, 17:41:09 PM
Perhaps I have not explained myself well: the cart is emptied only if at the time of login you select the "Remember me" option and close the browser without logging out. In all other cases the cart remains full.
If I disable the "System - Remember Me" plugin everything works correctly.
Title: Re: shopping cart lifetime
Post by: pinochico on October 19, 2020, 18:33:01 PM
bug?
Title: Re: shopping cart lifetime
Post by: ermes on October 19, 2020, 18:53:24 PM
Sure!
Title: Re: shopping cart lifetime
Post by: ermes on October 19, 2020, 19:04:03 PM
How can i report this bug?
Title: Re: shopping cart lifetime
Post by: pinochico on October 19, 2020, 20:41:26 PM
My VM hasn't "Remember me" option :D

Are you sure, that your VM has this option?
Isn't this option part of the Joomla login module or other applications, what do you think?
Title: Re: shopping cart lifetime
Post by: kess on October 20, 2020, 08:05:42 AM
Hello
I tried and confirm what Ermes discovered.

In fact, using the joomla login module with the remember plug in active, it is possible for a registered user to log in the first time and by checking the remmeber checkbox, then for 60 days the cookie allows access without having to log in again.

in this case, any abandoned carts are lost on the next return to the site.

I would say that in a btob it is normal to use the joomla module login
Title: Re: shopping cart lifetime
Post by: ermes on November 02, 2020, 09:57:07 AM
So do you confirm the bug? Will there be a bugfix in the next versions? I would like to give an answer to my clients.
Title: Re: shopping cart lifetime
Post by: AH on November 02, 2020, 11:12:14 AM
I am not sure it is a VM bug - just a consequence of using remember me and the differing functional aspects.

Remember me is login logic - the other is VM cart session life time.

I stopped showing the "remember me"  by overriding the layout of the Joomla login module
Title: Re: shopping cart lifetime
Post by: pinochico on November 02, 2020, 11:22:05 AM
Postulate:
Everything that does not behave as the customer imagines / needs it / thinks on the e-shop is a bug and it is necessary to fix it for free and create a new version of VirtueMart and preferably immediately.
Title: Re: shopping cart lifetime
Post by: ermes on November 02, 2020, 16:54:16 PM
How can i report the bug? With a pm to Milbo?
Title: Re: shopping cart lifetime
Post by: GJC Web Design on November 02, 2020, 17:40:20 PM
Max reads these post as well -- there is also dev and bug board -   http://forum.virtuemart.net/index.php?board=127.0
Title: Re: shopping cart lifetime
Post by: ermes on November 02, 2020, 18:30:56 PM
I have posted the bug in dev and bug board
Title: Re: shopping cart lifetime
Post by: Milbo on November 05, 2020, 16:06:32 PM
I would say it is a strange bug, which is imho from joomla. Looks like joomla does you not login, if "remember me" is used. I need to investigate that
Title: Re: shopping cart lifetime
Post by: ermes on December 07, 2020, 10:43:22 AM
Hi Milbo, there are news on this bug?
Title: Re: shopping cart lifetime
Post by: AH on December 07, 2020, 10:49:48 AM
In the meantime - why not just remove the remember me option from form using the core Joomla configuration settings
Title: Re: shopping cart lifetime
Post by: ermes on December 07, 2020, 16:10:00 PM
I have already unpublished the plugin, but i would to use it.
Title: Re: shopping cart lifetime
Post by: AH on December 07, 2020, 16:32:48 PM
You can keep the plugin, just turn off remember me -

I am not certain it enhances anything in the cart experience
Title: Re: shopping cart lifetime
Post by: ermes on December 07, 2020, 16:46:35 PM
I have already do it. I turned off the plugin when i discover the bug. But my customers love the "remember me" function, so i would re-enable it soon as possible.
Title: Re: shopping cart lifetime
Post by: AH on December 08, 2020, 10:02:09 AM
Quotelove the "remember me" function

Odd - it must be a real bind to have to login and have the browser auto populate the username and password

Maybe in time they will get used to not having it and love that too.

Title: Re: shopping cart lifetime
Post by: ermes on December 09, 2020, 10:23:26 AM
Hi AH,
I know all this solutions, but when the bug will be fix, i prefer to use the core plugin.
Howevere thank you for the suggests.
Title: Re: shopping cart lifetime
Post by: AH on December 09, 2020, 10:47:04 AM
I am referring to the core plugin - you just don't show remember me option.

And great that you solved it :-)

Not sure when or if a "fix" will arrive as more pressing things are being done