1

I need for the (soap) sales order API all prices with 4 decimal places.

Example:

9.45 => 9.4500

But only for the API not for other prices! I know the prices are already stored with 4 decimal places in the database. But I have no idea how I can change the API output.

Thank you and regards, Michael

  • try to override the interface of the required API and create your own class and in your class change the format of the price . In case of soap, override this file in webapi_soap folder and it will work for soap only. – nishu Aug 28 '19 at 10:16
  • Thank you that helping me for the first step. But now I have the problem that in the order class all price getter methods already output with 2 decimal places. I can not find where it is changed from 4 to 2 decimal places. Because in the database it is stored with 4 decimal places. – Michael Aug 29 '19 at 8:22
  • can you check this solution. magento.stackexchange.com/questions/150721/… – nishu Aug 30 '19 at 5:20
  • Thanks for you help. But the solution is very easy because the outputs are already with 4 decimal places. But float cut the trailing zeros. In Magento 1 it was not cutted but I think that a all Strings which are outputed. – Michael Sep 3 '19 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.