Api Response Product Price With Many Zeros

Hi guys,

When I make GET request for products, in the response all product's prices have 6 digits after the decimal point.

For example:

"price": "249.000000",

or

"price": "49.950000",

other numbers have correct format: "list_price": "0.00" for example

Is there any settings for this or do I have revise something in the code (and how?).

thank you in advance for your help

Hi guys,

When I make GET request for products, in the response all product's prices have 6 digits after the decimal point.

For example:

"price": "249.000000",

or

"price": "49.950000",

other numbers have correct format: "list_price": "0.00" for example

Is there any settings for this or do I have revise something in the code (and how?).

thank you in advance for your help

Hello!

It seems to be caused by the bug in the current version of CS-Cart / Multi-Vendor.

In order to fix it, please apply the attached .diff file.

https://docs.cs-cart.com/latest/upgrade/apply_diff_file.html

Please check it and let me know the results.

67459846067fe9259b9709b67e1a8a02518cf181.diff

Thank you for the reply,

I couldnt apply in SSH so apllied the change in the file manually fn.products.php

(i commended out the line that is the diff file was with "-" and i added right bellow the line with "+"

I checked the API calls and nothing changed, the problem with zeros still exists (i have cleared the cache &cc&ctpl).

I forget to mention that i am using cs-cart Multivendor 4.13.3

Thank you for the reply,

I couldnt apply in SSH so apllied the change in the file manually fn.products.php

(i commended out the line that is the diff file was with "-" and i added right bellow the line with "+"

I checked the API calls and nothing changed, the problem with zeros still exists (i have cleared the cache &cc&ctpl).

I forget to mention that i am using cs-cart Multivendor 4.13.3

Thank you for reply.

I am sorry that the fix wasn't helpful. Please revert those changes and apply the new ones from the .diff file attached to this message. Changes from this diff will be included in the upcoming 4.15.2 version of CS-Cart & Multi-Vendor.

Thank you.

3b359a0d1d26283520a9dd0fa6507bfcf6279275.diff