Salvatore: Change Price Coma Into Point

Hi,

This time i want to share a tutorial about how to change the price separator at Salvatore theme. By default, it will displaying your price delimited with coma. For example: $500,00. Some people/country prefer it to be written on this format: $500.00.

At this tutorial, i will tell you about how to do it.

First, open a file named theme-orders.php. This file can be found via FTP at directory: wp-content → themes → salvatore → includes. Open the file and find out this code:

function colabs_get_price( $price, $currency_code = '' ){
  if(''==$currency_code)$currency_code = get_option('colabs_currency_code');
  $currency_symbol = colabs_get_currency_symbol($currency_code);
  $base_price = number_format( $price, 2, ',', '.' );

Modify it become:

function colabs_get_price( $price, $currency_code = '' ){
  if(''==$currency_code)$currency_code = get_option('colabs_currency_code');
  $currency_symbol = colabs_get_currency_symbol($currency_code);
  $base_price = number_format( $price, 2, '.', '.' );

And done!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s