I’m facing an issue in my Magento 2 store during checkout when using Stripe as the payment method. When a customer adds the same product to the cart multiple times (e.g., three units of a single product) and proceeds through the checkout process, the total amount displayed on the final order placement page is incorrect. It seems as though the total is being miscalculated, possibly multiplied or inflated unexpectedly.
Environment Details:
- Magento Version: 2
- PHP Version: 8.2
- Theme: SM Market Theme
This miscalculation occurs specifically when selecting Stripe as the payment method and appears on the order review page right before placing the order. Any insights into why this might happen or where to check for possible configuration issues would be greatly appreciated.
Steps to Reproduce:
- Log into a customer account.
- Navigate to the shop page.
- Add the same product to the cart three times.
- Proceed to checkout.
- Review the cart and shipping information.
- Continue to payment method selection (Stripe).
- On the final order placement page, the total amount is incorrect.
What I’ve Tried:
- Cleared the cache to rule out caching issues.
- Reviewed the XML configuration file for any discrepancies in checkout block settings.
- Inspected the code responsible for calculating checkout totals to identify potential errors.
Expected Behavior:
When a single product is added to the cart multiple times, the total should calculate as:
(Product Price × Quantity) + Shipping Cost = Total
Actual Behavior:
After adding the same product to the cart three times, the checkout displays an incorrect total, as if the total amount has been multiplied by 3. This unexpected calculation results in an inflated final price.
Questions:
- What could be causing this incorrect calculation during checkout when using Stripe?
- Are there common configuration issues with Magento 2 that could lead to this inflated total when multiple quantities are added to the cart?
- Where should I check further to troubleshoot the issue, especially within the checkout and payment gateway configurations?
Any guidance or suggestions on how to resolve this issue would be greatly appreciated!