LaserDisc Database
https://forum.lddb.com/

Save the items for later in shopping cart
https://forum.lddb.com/viewtopic.php?f=8&t=7576
Page 1 of 1

Author:  laserpaal [ 24 Jan 2018, 17:40 ]
Post subject:  Save the items for later in shopping cart

Is there a possibility for implementing this feature?
When my account got automatically logged out after a while, I lost all the items that I had added to the shopping cart.
It would fit nicely beside the "Update you shopping cart" button.

Author:  admin [ 25 Jan 2018, 13:22 ]
Post subject:  Re: Save the items for later in shopping cart

laserpaal wrote:
Is there a possibility for implementing this feature?


Hello!

Everything is possible :-)

laserpaal wrote:
When my account got automatically logged out after a while, I lost all the items that I had added to the shopping cart.
It would fit nicely beside the "Update you shopping cart" button.


The technical underlying problem is that the cart can be kept in (at least) 3 different ways:

  1. COOKIE level - but then when you use a different device, the cart is gone because the cookie is local to your machine
  2. SESSION level - it follows your login/account but will expire when PHP5 decides to make a round of clean-up and delete too old sessions --- I coded this one and it should stay alive for some time before disappearing
  3. DATABASE level - persistent but will require a major rewrite of the Cart code

I added one item unlikely to sell any time soon in my own cart.
Let's see how long it stays there while I reconnect from different devices.

Julien

Author:  admin [ 25 Jan 2018, 16:16 ]
Post subject:  Re: Save the items for later in shopping cart

admin wrote:
SESSION level - it follows your login/account but will expire when PHP5 decides to make a round of clean-up and delete too old sessions --- I coded this one and it should stay alive for some time before disappearing


One possible tuning that I didn't revisit when reinstalling the server from scratch was the PHP "session.gc_maxlifetime" currently set at 1h:

session.gc_maxlifetime   3600


Let's make it 24h as a test.

session.gc_maxlifetime   86400


Julien

Author:  admin [ 26 Jan 2018, 09:05 ]
Post subject:  Re: Save the items for later in shopping cart

So far the item I put in cart at 9:30am is still there more than 6 hours later.

Reason good enough for hope? :-)

Julien

Author:  laserpaal [ 27 Jan 2018, 11:48 ]
Post subject:  Re: Save the items for later in shopping cart

admin wrote:
So far the item I put in cart at 9:30am is still there more than 6 hours later.

Reason good enough for hope? :-)

Julien


I would say that is great reason enough for hope! Thank you, Julien. You strive to keep the forum up to date, for that I'm grateful! :)

Author:  rein-o [ 27 Jan 2018, 18:59 ]
Post subject:  Re: Save the items for later in shopping cart

Yes, thanks for keeping it running, could be running longer than actual LD players, Literally.

Author:  admin [ 28 Jan 2018, 06:38 ]
Post subject:  Re: Save the items for later in shopping cart

rein-o wrote:
Yes, thanks for keeping it running, could be running longer than actual LD players, Literally.


Then we can still display these gorgeous LD cover art on the wall :-)

Julien

Author:  legovelt [ 02 Mar 2018, 23:49 ]
Post subject:  Re: Save the items for later in shopping cart

Items are currently not saving in the shopping cart. Added to cart, signed out and then back in and they were no longer there.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/