Skip to content

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