Skip to content

Fix double currency conversion for configurable products #1765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matteo-oliunid
Copy link

Description

Fixes double currency conversion issue for configurable products that caused incorrect prices in non-base currencies (e.g., AUD prices were double-converted from EUR).

Problem

  • Configurable products had prices converted twice: once in getSpecialPrice() and again in getMinMaxPrices()
  • This resulted in incorrect prices like: 122.05 EUR → 214.15 AUD → 375.76 AUD (double conversion)

Solution

  • Modified getSpecialPrice() to only convert currencies for simple products
  • Configurable products now rely on getMinMaxPrices() for currency conversion
  • Added condition: (!$subProducts || count($subProducts) === 0) to determine conversion logic

Testing

  • Tested with configurable products in AUD/USD currencies
  • Verified simple products still work correctly
  • Confirmed no double conversion in logs

- Prevent double conversion in getSpecialPrice() for products with children
- Add condition to convert only for simple products
- Fixes incorrect AUD/other currency prices in Algolia index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant