Skip to content

[5.x]: Can discounts Match Customer check against a completely anonymous cart #4156

@nfourtythree

Description

@nfourtythree

What happened?

Description

Current behaviour dictates that as soon as you create one rule in a customer condition on a discount this requires the cart must have a customer on it (even if they are a guest/non-credentialed user).

This works for the most part but does somewhat require that the email address for a cart is taken early in the process.

For example, somewhere this logic falls down is if a discount:

  • has a coupon code
  • has user group customer condition rule "where user is not in group XYZ"

If the coupon code is entered earlier than the email then this fails, even though logic may suggest an anonymous customer who is yet to provide those details is not in that group.

Craft CMS version

5.x

Craft Commerce version

5.x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions