• Resolved owengna

    (@owengna)


    We uploaded lots of products using CSV import.

    Some products are showing the price incorrectly, e.g $63.02 in the backend will show $63.030000000000001 in the front end and order calculation. It only happens to certain prices, some price such as $52.81 are displaying correctly.

    We tried to change the decimals setting to 1 and it works fine but if i changed it to 2 or 3, some prices have those problem.

    We are using the latest Woocommerce version 3.6.4 and WP version is 5.2.2.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Can you add more details? There are 2 possibilities

    1. Ensure that all your WooCommerce theme templates are up to date as this is an issue in front end only.

    2. Next, the pricing for those affected products may be imported with a similar pricing structure like $63.030000000000001 from CSV. To make sure you can check those entries directly in database tables. This may have happened while editing it in MS excel some times. If that is the case as a temporary solution, you can reimport those products after correcting these prices to 2 decimal values.

    • This reply was modified 6 years, 11 months ago by smacksupport.
    Thread Starter owengna

    (@owengna)

    @smacksupport

    Thank you for the reply.

    1. It happens to the backend as well, the total calculation is with the decimals.

    2. I checked the csv and it seems fine. I tried to play around the price again, for those price that have issues, the decimals are still playing if i change the last decimal. E.g change 24.02 to 24.01 will become 24.010000000000002

    Thread Starter owengna

    (@owengna)

    I found out the problem. Our programmer added a function to wc_price which created this bug. It is resolved from our end now.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Price Decimal issue’ is closed to new replies.