Price rounding problem
-
Hi,
I have been testing Wp All Import + Import Products from any XML or CSV to WooCommerce in local and I am really impressed by its power and ease of use.I am trying to import products using a CSV and at the same time I want to modify the price on the fly using the maths function.
This is the short code I am using [MATH({price[1]},”+”,”2″)]. I have noticed that Wp All Import rounds the prices before running the mats function resulting in incorrect output.
For example the original price of the first product in the CSV is 4,400000000 and the output is 6 instead of 6,4 after using [MATH({price[1]},”+”,”2″)].
If I use this short code [MATH({price[1]},”*”,”1″)] the result is 4 instead of 4,4
?Is there a way to tell Wp All Import not to round prices?
By the way I am using commas for decimals and dots for thousands separation. I also have defined two decimals as the default for prices output in Woocommerce settings.
I have also tried using different themes to avoid posible rounding functions that may be running in the backend but no success.
I would be so thankful if you could shed some light on what I should do or what I am actually doing wrong.
Looking forward to your help.
- The topic ‘Price rounding problem’ is closed to new replies.