M2: Quote Lifetime vs Persistent Shopping Cart

Most previous questions on this are old, related to M1 and never garnered a conclusive response.

Why is there a need for a Persistent Shopping Cart (PSC) and how does this interact with Quotes?

On our M2.3.3 site, we see quotes being created when anyone visits the site – although not all the time. For example, we have an uptime monitor that polls every minute. Sometimes we see a new “null” quote created each time the monitor polls (from the same IP) and other times nothing. Same for bots visiting the site. These quotes remain active and stay, unused, in the quote table forever. There are now thousands of null quotes registered with the same IPs but no customer.

What’s the logic for when it decides to create a new quote?

When a customer logs in (we’re B2B and require login to even view the shop), they either get a quote created or an existing quote updated. Anything added to the cart goes in the quote and lives there forever; quote lifetime only applies to inactive quotes (i.e. those converted to orders). Login from another device and what’s in the cart is there. Persistent Shopping Cart is disabled.

So there’s no need for PSC to maintain a cart, despite how PSC is described and the use-cases for registered customers presented in the documentation for it.

So what is the point of the PSC? Is it meant as a cookie-based fix for whatever is happening with guest quotes, where they seem to be randomly created or not?

Can anyone shed some light on why there are apparently two different mechanisms for the same thing – retaining a cart.

Go to Source of this post
Author Of this post: Adam Lavery
Title Of post: M2: Quote Lifetime vs Persistent Shopping Cart
Author Link: {authorlink}