Skip to content

Percentage discount on tier price and catalog price rule calculated on original price without selected options. #38750

@mdkdev

Description

@mdkdev

Preconditions and environment

  • Magento <= 2.4.7

Steps to reproduce

For a clear example, use the following numbers:

Product Price: 1000
Tier Price: 50% Discount
Custom Option Value: -500

  • Configure a simple product with a price (1000) and a custom option with at least two values. Set one of the price of the values to 0, and another one to a negative number (-500).
  • Set a tier price with a percentage discount (-50%)
  • Go to the frontend, and visit the product. Select the negative custom option value, and the qty that was set on the 50% tier price.

image

image

Expected result

The tier price discount is calculated on the price including the custom options. For example:

(1000 - 500) / 2 = 250

Where 1000 is the original product price, 500 is the negative custom option value and 2 is the 50% discount from the tier price.

Actual result

The tier price is calculated based on the original product price without the selected custom options.

(1000 - 500) - 500 = 0

Where 1000 is the original product price, 500 is the negative custom option value and the other 500 is 50% of the original product price (1000).

Additional information

Screencast:
https://github.com/magento/magento2/assets/6543944/41b32739-a861-40b8-8a21-19c562a48c03

Scenario:2

The same problem occurs when a catalog price rule is set to (for example) a specific customer group. The discount is then deducted from the original price, which means that the following example results in a 0,- total:

Original Product Price: 1000.00
Cart Price Rule: -50%
Custom Option Price: -500

Total Price: (1000 / 2) - 500 = 0.00

This should be a 50% discount on the configured product:

Total Price: (1000 - 500) / 2 = 250.00

magento_cart_price_rule_custom_options.mp4

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ProductComponent: PricingIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions