-
Notifications
You must be signed in to change notification settings - Fork 0
Description
PHP Version: 8.2 | Shopware Version: 6.6.9.0 | Affected area / extension: Platform(Default)
Actual behaviour:
Multiple customers reported the following problem to us:
A discount is not correctly taken into account in an order if the order was changed after the discount was added.
After the order has been received, without changes, the total amount is displayed correctly. If an item is deleted, added or the items were edited, the order is recalculated. The discount order line item is still listed in the order line items but the discount is no longer included in the total amount of the order.
We have not yet been able to identify exactly if a specific product, shopping cart or order rules cause the discount to be ignored or if there are other factors we don't know about yet.
However, we have noticed the following so far. The discount no longer applies for already created, if:
- The discount is inactive
- The validity date has been exceeded
- The sales channel is removed under “Authorizations”
- The promotion code is changed
We have not yet been able to determine whether and which exact product, shopping cart or order rules and their combination lead to the discount not being included in the calculation.
Expected behaviour:
The discount should remain the same for orders that have already been created, despite changes in the discount configuration. The discount should remain active for the order even after changes have been made to the order and should be included in the order recalculation.
How to reproduce:
- Create a promotion discount without any rule based conditions or a validation date. The discount should be active. The sales channel should be assigned correctly.
- Create an order with a product and the discount. Save the order.
- Add a custom line item to the order and save the changes. You should see the correct total including VAT.
- Change one of the four points mentioned above in the promotion discount configuration and save the changes.
- Again, add a custom line item to the order and save the changes. Now the price of the discount will no longer be included in the total including VAT.
Screenshot 1 shows the order with a discount. No changes were made in the discount configuration. The total incl. VAT is calculated correctly. Credit 01 was added after creating the order.
Screenshot 2 shows the order with an inactive discount. Credit 02 was added after changing the discount from active to inactive. The total incl. VAT is recalculated incorrectly. The difference is as high as the discount.
