adobe / commerce-events

MIT License
6 stars 7 forks source link

Dint 910 & DINT 911 - Round prices for productListItems for AEP events #145

Closed benjaminkalk closed 8 months ago

benjaminkalk commented 8 months ago

Description

Related Issue

https://jira.corp.adobe.com/browse/DINT-910

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist

grahamcrackers commented 8 months ago

I'm curious with these fixes, when the default currency is set to EUR, is the issue with the actual formatting, or is there a discrepency between using , and . as currency seperators.

benjaminkalk commented 8 months ago

I'm curious with these fixes, when the default currency is set to EUR, is the issue with the actual formatting, or is there a discrepency between using , and . as currency seperators.

The problem is doing float math causing floating precision errors. Also, magento core stores numbers to 4 decimals, but we are being required to have just the two decimal places.