Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: check if # rule matches with coupon code #44104

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nikolas-beckel
Copy link

Summary

There are two coupon codes, each with distinct # rules:

  1. Karneval2024: Discounts a specific item (20%, Item Code 003).
  2. Winter2024: Discounts items from a specific item group (50%, Item Group "Accessoire").

In a sales order, two items are added. The first item belongs to the item group eligible for a discount from Winter2024, while the second item is the specific item eligible for a discount through Karneval2024.

When I apply Karneval2024 in the sales order to discount only the specific item, Winter2024 # rule is also incorrectly applied, as it matches the second item (because it is in the item group).

Changes

Update the check in get_#_rule_for_item and check whether the current # rule matches the specified voucher code.

Backports

version-14
version-15

Issue

closes #40013

Images

Winter2024 Coupon Code and # Rule:
image
image

Karneval2024 Coupon Code and # Rule:
image
image

Added Karneval2024 Coupon Code to Sales Order, both Items discounted:
image
image

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 12, 2024
@ruthra-kumar ruthra-kumar removed the request for review from deepeshgarg007 November 14, 2024 05:59
@ruthra-kumar ruthra-kumar self-assigned this Nov 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coupon code based # rules are auto applied without checking the coupon code entered in sales order
2 participants