Wrong pricing from autocomplete

Hi,

I’m having an issue related to the prices when listing from the autocomplete.
I have 2 main stores, one for Canada and one for the US. Of course that on the Canadian store the prices are listed in CAD and on the US store the prices are in USD.

The problem is that the auto-complete search is showing a wrong price when I’m on the US store. Basically, it’s converting the currency again. So if a product costs CAD 100, and the Magento currency converter is working with a rate of 0.76, that means that the price for the US store should be USD 76.
But, the Algolia indexing is somehow doing the conversion twice.

When checking the Algolia backend I can see that the Price array for a particular product shows CAD and USD. Within each currency group, I can find default, default_formatted and a bunch of group_X (where X corresponds to incremental number). For the CAD pricing everything seems good, but when listing the USD options I can see that the default and default_formatted are ok, but the option_X have a wrong amount, that’s the default amount multiplied by the conversion rate. So it’s doing the conversion again and showing the wrong amount for the auto-complete search results.

Any help?

No expert (yet ;), but these group_x prices appear when you enable customer group pricing in the configuration. The number is the ID of the customer group

Great catch @alex1

So, here’s what’s going on, for a product that costs 100 CAD I have:

CAD:

  • default: 100
  • default_formatted: $100
  • group_1: 100
  • group_2: 100

USD

  • default: 76
  • default_formatted: $76
  • group_1: 57.76 (which is 76 * 0.76, converting twice)
  • group_2: 57.76 (which is 76 * 0.76, converting twice)

I disabled the customer groups for now but, apparently is an issue.

Hello @max and @alex1,

great catch there. I created a GH issue for that and we’ll address it soon.