View Categories

Fix Price-by-Quantity Decimal and Separator Issues

To fix wrong decimals or separators in quantity pricing from Price by Quantity & Bulk Quantity Discounts for WooCommerce, set your separators at WooCommerce > Settings > General, check Rounding at WPFactory > Product Price by Quantity > General, and always type discount values with a dot, even in comma-decimal locales.

Symptoms #

  • Calculated prices show the wrong number of decimals.
  • Discount amounts appear off because of comma versus dot formatting.
  • A discount such as 2,5 behaves like 2, or percentages in the pricing table show a dot (for example -12.5%) while your prices use a comma.

How numbers work in the plugin #

  • Level Min quantity fields use a number input with a step of 1, so they take whole numbers.
  • Level Discount fields use a step of 0.0001, entered with a dot as the decimal separator in the admin.
  • Every level value is converted to a number when prices are calculated. Anything after a comma is dropped, so 2,5 is read as 2.
  • Prices (old price, new price, discount amount, totals) are formatted by WooCommerce using your currency settings, so the separators you see on the storefront follow WooCommerce, not a plugin option.
  • Percent values and raw numbers are printed as plain numbers with a dot, because they are not prices. This applies to %discount_percent%, %level_discount_percent%, %level_discount_amount% and the percent discount row of the general pricing table.

Fix step by step #

  1. Set WooCommerce currency formatting. Go to WooCommerce > Settings > General and set the decimal separator, thousand separator, and Number of decimals to match your locale. These control how prices display.
  2. Check the Rounding option. On WPFactory > Product Price by Quantity > General (also reachable at WooCommerce > Settings > Product Price by Quantity), the Rounding setting (alg_wc_wholesale_pricing_round, default Yes) rounds the calculated wholesale price to the WooCommerce “Number of decimals” value. Turn it off if you need the raw calculated figure.
  3. Enter admin values with a dot. When typing discount values in the settings, use a dot for decimals (for example 1.5), regardless of your site locale. Re-open any level you entered with a comma and correct it.
  4. Show whole-number percentages. If decimals in percentages look out of place, use the rounded placeholder %level_discount_percent_rounded%, or add add_percent_row_rounded="yes" to the product pricing table shortcode.
  5. Use price placeholders for money. In a table row format, use %level_discount_amount_price% instead of %level_discount_amount% so the amount follows your WooCommerce separators and currency symbol.
  6. Group large quantities. To add a thousands separator to quantities shown in a table, use the qty_thousand_sep attribute on the table shortcode, for example [alg_wc_product_ppq_table qty_thousand_sep=","].

Options that affect number formatting #

Label Where Default Free/Pro
Rounding (alg_wc_wholesale_pricing_round) General Yes Free
Formula and shortcodes (alg_wc_wholesale_pricing_process_formula) General No Free
Discount type (alg_wc_wholesale_pricing_discount_type) All Products Percent Free
qty_thousand_sep shortcode attribute Pricing table shortcodes Empty (no separator) Free

If it still looks wrong #

  • Formula and shortcodes is on. With this option enabled, the All Products level fields become plain text fields, so a comma is saved as typed and then cut off at the comma. Type values with a dot.
  • Rounding is off. The cart item price is then set to the unrounded calculated value, which can carry more decimals than WooCommerce shows. Turn Rounding back on if cart figures look slightly off.
  • The table shows a percent with many decimals. With a Fixed discount type, the percent is calculated from the price and shown with up to 2 decimals. Use the rounded placeholder.

FAQ #

Does the plugin have its own decimal or thousand separator setting? #

No. Prices use the separators from WooCommerce > Settings > General. The only separator the plugin adds is qty_thousand_sep for quantities in the pricing table shortcodes.

Why does my table show “-12.5%” when my prices use commas? #

Percentages are not prices, so WooCommerce does not format them. They are printed as plain numbers with a dot. Use %level_discount_percent_rounded% to show a whole number instead.

Which placeholders follow my WooCommerce price format? #

The price placeholders, such as %old_price_single%, %new_price_single%, %new_price_total% and %level_discount_amount_price%, are formatted by WooCommerce. See the Price by Quantity placeholders reference and the shortcodes guide. For other table problems, see fix Price-by-Quantity table display issues.

Get more control #

These settings are free. Price by Quantity & Bulk Quantity Discounts for WooCommerce Pro adds quantity pricing per product category and tag, and grouping by product parent, category or tag in the quantity calculation. See what Pro unlocks.

Still incorrect? Share your WooCommerce currency settings and an example with our team on the Price by Quantity support forum.