cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove brackets from Price Data Object when the value is negative .

Former Member
0 Kudos

I have a scenario where price data object has negative value . In such scenarios formatted value is returning value with braces for e.g ($100) .is there any possibility of not having this braces ?

For a -9999 value which is converted to priceData object , current output: ($9,999) for negative value expected output: -$9,999

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

One option I think is that you could create a custom class that extends/replaces hybris DefaultPriceDataFactory.java. In there you could customize the methods that format the display price of the PriceData object. Create the custom class and then wire it up as a Spring Bean in your custom extension. Set the alias on the bean to point to priceDataFactory.

Here is the OOTB bean declaration for the DefaultPriceDataFactory: