Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is this OK


Guest

Recommended Posts

I am wanting to put a space between the US Dollar sign & the actual price. I have successfully added this space by modifying catalog/includes/classes/currencies.php & altering this line

		$format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

to make it like this

		$format_string = $this->currencies[$currency_type]['symbol_left'] .' '. number_format(tep_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

 

I have added items to cart with this mod, but does anyone know if it will have any effects on any part of my site operation? I know that when the script is making calculations that it has to make the calculations with the raw data since it can't calculate with currency symbols. The currency symbols is just added for the human eyes, but will this space cause a script error anywheres?

Link to comment
Share on other sites

I am wanting to put a space between the US Dollar sign & the actual price. I have successfully added this space by modifying catalog/includes/classes/currencies.php & altering this line
		$format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

to make it like this

		$format_string = $this->currencies[$currency_type]['symbol_left'] .' '. number_format(tep_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

 

I have added items to cart with this mod, but does anyone know if it will have any effects on any part of my site operation? I know that when the script is making calculations that it has to make the calculations with the raw data since it can't calculate with currency symbols. The currency symbols is just added for the human eyes, but will this space cause a script error anywheres?

Why doing this through code ? If you go to your admin and change the valuta sign from $ to $  you will have the same.

Link to comment
Share on other sites

Why doing this through code ? If you go to your admin and change the valuta sign from $ to $ you will have the same.
Simple way vs hard way... :D I never thought of doing it your way...much easier. It want have an adverse effect on my site in way right?
Link to comment
Share on other sites

Simple way vs hard way... :D I never thought of doing it your way...much easier. It want have an adverse effect on my site in way right?

There is many ways to Rome as they say and it is never wrong to get to know some code :P

I should have added that the way you change it should be okay to. I can not think of anything for which this would give problems.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...