Skip to content
Discussion options

You must be logged in to vote

You can run a job that deletes the carts:

#379 (comment)

$q = \OFFLINE\Mall\Models\Cart
            ->where('customer_id', null)
            ->where('updated_at', '<', now()->subMinutes(10))
            ->get()
            ->each
            ->delete();

Please be aware that 10 minutes is a very short time. The customer might still be completing a checkout in this time span.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tobias-kuendig
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants