Skip Navigation

[Resolved] formatting my woocommerce prices in standard currency format (US dollars)

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by Jamal 3 years, 3 months ago.

Assisted by: Jamal.

Author
Posts
#2130141

Tell us what you are trying to do?
I simply need a dollar sign and thousands separator (comma) in my prices

Is there any documentation that you are following?
a few similar support forum threads did not help

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2130385

Hello and thank you for contacting Toolset support.

Toolset does not generate WooCommerce output on its own. It just wraps the core WooCommerce functions. How the price is generated, is defined by WooCommerce settings in WooCommerce->Settings->General(tab). Check this screenshot hidden link

If that does not work as expected for you, I would suspect a conflict with the theme or another plugin. Please check how the price appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty-Twenty. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at a time to track where the incompatibility is produced.

If that does not help, I'll need to take a closer look at your website. And I might also need to take a copy and debug it locally. Let me know if that's fine with you.
Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2130415

Sorry about the autocorrect, there should be no space in the SFTP username.

#2130417

I can see why this happen. You were using the Single Field block. Indeed, that block has limited support for formatting. You can have a pattern, but the thousands and decimal separators cannot be implemented easily, at least without custom code.

Instead of using a Single Field block to display the price, use the Produce Price block. I added it to the content template just before the Single Field block. Check how it renders the price hidden link

I hope this helps. Let me know if you have any questions.

#2130419

That's great, that solves my problem. Thanks very much!

While you are looking at my site maybe you can help with another issue. When I enter class names in the Advanced tab, with one of my conditional blocks selected (or one of the blocks inside the conditional), the class name is not saved. If I click the Update button it seems to save it, but when reloading the template later the class name is not there. Any idea why this happens? I already had tried switching themes and that did not help.

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/unable-to-save-css-class-in-blocks-settings/

#2130659

Sure. However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created another ticket for your last question and I'll be posting my reply there.