Menu
Feedback
Start here

Known issues

Known issues
Incorrect price rounding when unit multiplier is different from one
Intelligent Search
ID: 1258875
Backlog
Published on7/24/2025
Last updated on7/24/2025
1 min read

Summary

Intelligent Search may retrieve a product's price with more than 2 decimal places when the unit multiplier is different than 1.

For example, a unit of a product is $69,26, where the unit multiplier is 85.

So, the calculation that Intelligent Search does, when the unit multiplier is different from 1, results in a price of $0,815.

As the price resulted in a price with three decimal places, when rounded by the vtex.format-currency, the price rounding diverges, resulting in $0,82 instead of $0,81, which is the price shown in the checkout simulation.

This rounded price is being used to calculate the component's price. Since it's rounded before the calculation, the final price is incorrect.

Simulation

In a search context, load a product that has a unit multiplier different than 1 and whose unitMultiplier*price results in a number with more than 2 decimals.

Workaround

N/A

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback