Skip to content

[Shopping basket] Discount is not calculated correctly #1

@tanjaq

Description

@tanjaq

Describe the bug
With discount amounts over 1000, the discount calculation is not correct.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://moonavoor.ee/est/tooted/tapeedid/rasch-textil/bloomsbury---uus/fototapeet-duncan-terra-302836302867/'
  2. Add 99 product to the shopping basket
  3. Open the shopping basket
  4. Scroll down to the bottom
  5. ALE -15% shows incorect amount -7 €

Expected behavior
ALE -15% should have discount amount of -7 722€

Screenshots
image

Logs
Request URL: https://moonavoor.ee/ajax/id:12444/action:changeAmount
Request Method: POST
Payload:

  • basketProductId: 71420246cdba00dc0c521707f29caad6
  • productAmount: 99

Response:

responseData
 shoppingBasketData
    discountsList:
      amount: "7.00"
      code: "discount131231"
      id: 131231
      title : "ALE -15%"

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser - Chrome Version 119.0.6045.159

Additional context
Problem seems to be on the backend calculation side.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions