Hi @eiriksnilsen,
There are no options or attributes available with the shortcode at the moment to modify the thousand separators, however, you can use those filters to modify the output of the price :
mag_products_integration_product_final_price_without_tax
mag_products_integration_product_regular_price_without_tax
More details here: https://magentowp.santerref.com/documentation.html#filters
Read here about number_format in PHP: https://php.net/manual/en/function.number-format.php
number_format ( float $number , int $decimals = 0 , string $dec_point = "." , string $thousands_sep = "," ) : string
Example:
<?php
// Do the same for both filters.
add_filter( 'mag_products_integration_product_final_price_without_tax', 'my_theme_update_separator', 10, 4 );
function my_theme_update_separator( $price_with_prefix_suffix, $prefix, $price, $suffix ) {
return $prefix . ' ' . number_format($price, 2, '.', ',') . ' ' . $suffix;
}
-
This reply was modified 6 years ago by
santerref.
-
This reply was modified 6 years ago by
santerref.