How to adjust price decimal format and add currency code

In some cases our source file may include pricing formats that seem a bit off and include more decimals (too many digits after commas) than needed, thus making them susceptible to being rejected by some sales channels. Our goal here is simple.

Change this:

254.900000 RON

Into this:

254.90 RON


In this example, we also need to reformat the pricing by replacing the dot (.) with a comma (,). For that we will use the following settings (remember to always use test mode to see a preview of any changes being applied):

IF

all elements

THEN

Price - Number format - Decimals "2" (since we usually want two digits after commas)

Decimal separator "."

AND

Price - Replace value

Search: "."

Replace with: ","

As you may notice, by implementing the above adjustment, we have stripped off the price from its' currency value (RON). To fix this, we can add another AND adjustment and append the price value with " RON" (keep in mind you need to add a space before the currency code to avoid joining the values together)

Price - Append value " RON"