• I’m having no luck being able to display only 2 decimals (standard currency format) on the individual product page. Both the Cart & Checkout pages display the usual 2 decimals but I can’t get the product page to follow suit. I’ve tried a variety of custom code to change the display but I can’t seem to target the ‘ppw_total_amount’ element – it always returns an error because it’s ‘undefined’ when I’m attempting to access it. Is there an easy fix for this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • HI @vivepericulose, I’m so sorry for the delay in getting back to you, Can you please explain which price you are referring to?

    Thread Starter vivepericulose

    (@vivepericulose)

    No worries. I tried creating individual product pages with Elementor’s Canvas function instead of relying on a theme. When I use woocommerce’s ‘add to cart’ widget I can get all the functionality I’m looking for except the resulting ‘Total Price’ in standard currency format. Here’s a sample link: https://cheapredpen.com/product/proofreading-bronze/

    If you upload a document that has an odd number of characters, then you get a total price with 3 digits beyond the decimal point. The Cart page & the subsequent Checkout page both show the total price rounded to 2 decimal points but I can’t get the individual product pages to do likewise.

    I even tried editing the php file where the ‘ppw_total_amount’ element shows up and change the “.toFixed(decimal)” to “.toFixed(2)” but it didn’t seem to have an effect.

    Did you tried switching theme to basic twenty themes and see if that make anything different? Also did you checked following settings https://prntscr.com/kr53nu. Because, this must have something to do with the basic WOO config, I dont think we are doing any such formatting.

    Please check those and let me know what you got.
    Thanks!

    Thread Starter vivepericulose

    (@vivepericulose)

    I have those settings correct. That’s what fixed the Cart & Checkout pages. But they seem to have no effect on the product page. I just tried reverting back to a basic theme but it still displays the same 3 decimal places. https://prnt.sc/kr56ta

    ah, Okay, I think We may need to look at this. I have added this to our backlog and will look into that in a future release.

    Thanks!

    Thread Starter vivepericulose

    (@vivepericulose)

    Great. Thanks for the quick responses. Hopefully it’s an easy fix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Number of decimals displayed’ is closed to new replies.