Describe your bug or feature request.

Order Type settings from allows to determine whether it is possible to expire abandoned carts after certain period of time.

There are stores that might want to keep track of abandoned carts to follow-up on them or keep track of statistics. However, when these sites allow guest checkout, the database size can grow more than expected due to anonymous carts that might be created by bots.

Would be great if Commerce Cart would expose an extra feature to only expire carts that do not belong to any site customer.

If a bug, provide steps to reproduce it from a clean install.

Issue fork commerce-3558178

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

plopesc created an issue. See original summary.

plopesc’s picture

Status: Active » Needs review

MR is green. Moving to NR.

deviantintegral’s picture

Code looks good to me, no notes!

Since it's only bee a few days, I've got a note to bump this to RTBC in a few weeks if there's no further followups.

jsacksick’s picture

Looks good at first glance, perhaps we can replace:
$order->getCustomerId() != 0 with !$order->getCustomer()->isAnonymous() or $order->getCustomer()->isAuthenticated()

  • jsacksick committed 79f30b73 on 3.x authored by plopesc
    feat: #3558178 Add setting to allow expiration of anonymous carts only...
jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.