Description
When users navigate from the website with a coupon code, the checkout displays the full price instead of the discounted price + taxes. This was caused by conflicting useEffect
that were overriding the discounted price calculation.
Changes:
- Removed a
useEffect
that was causing side effects and overwriting the discounted price - Fixed the order of price calculations to properly handle coupon code updates
- Ensured the total price correctly reflects: discounted price + taxes
Related Issues
--
Related Pull Requests
--
Checklist
- Changes have been tested locally.
- Unit tests have been written or updated as necessary.
- The code adheres to the repository's coding standards.
- Relevant documentation has been added or updated.
- No new warnings or errors have been introduced.
- SonarCloud issues have been reviewed and addressed.
- QA Passed
Testing Process
- Discount applied correctly when the coupon code is present in URL.
- Price updates correctly when applied discount is removed.
- Price updates correctly when coupon is manually added.
Additional Notes
--