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

未关闭
#4,156 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
php
领域
backend

调研方向

首先跟踪购物车中 discount 客户条件的评估过程,其中优惠券代码是在电子邮件地址之前输入的。在匿名购物车上复现用户组规则 "where user is not in group XYZ",然后验证无需先要求客户详细信息即可评估该条件。

由索引模型根据 Issue 内容生成。

描述

💡 enhancement commerce5 Craft Commerce
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

主要语言
PHP
星标
242
派生
172
平均合并
21 小时 23 分钟
30 天内合并 PR
76

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

craftcms/commerce 的其他 Issue

查看 craftcms/commerce 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。