Countdown timer for Cart #1079
Replies: 1 comment 4 replies
-
Out of curiosity, what's your use case for this? Why do you need a user's cart to be wiped out after a set amount of time? By default, Simple Commerce's "cart" is stored in a cookie, rather than in the user's session. It looks like it might be possible for us to set an expiry date/time for the cookie but I wonder if it might be easier for you to just remove the line items from the customer's existing cart instead of creating a new cart completely, otherwise you might end up with lots of unused carts. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the optimal method for implementing a countdown timer for a cart page? The cart is stored in the session, right? Can the creation timestamp of the cart/session be retrieved on the frontend to display a countdown timer? Then the
SESSION_LIFETIME
is set to 60 minutes. Once the timer expires, the page should refresh, resulting in an empty cart or a new session.Beta Was this translation helpful? Give feedback.
All reactions