Jump to content



Latest News: (loading..)

- - - - -

Decimal Places


  • Please log in to reply
3 replies to this topic

#1   UnseenMenace

UnseenMenace
  • Members
  • 63 posts
  • Real Name:Paul

Posted 27 September 2005 - 08:01 AM

I Have a default currency of GBP ( UK Pound ) and the decimal places are set as being 2 with the symbol . to identify this and , to identify a thousand however when I enter a value such as 10,680 into any product it displays as being 10.68 and changing the number of decimal places makes other prices look odd such as 6.00 looks like 6.00000 is there a solution to resolve this ?

#2   Vger

Vger
  • Members
  • 16,978 posts
  • Real Name:R Anthony
  • Gender:Not Telling

Posted 27 September 2005 - 12:30 PM

Yes, enter the value as 10680.00

Vger

#3   p4y

p4y
  • Members
  • 1 posts
  • Real Name:Adam

Posted 14 June 2012 - 12:45 PM

View PostVger, on 27 September 2005 - 12:30 PM, said:

Yes, enter the value as 10680.00

Vger
Can i ask how to remove thousands symbol , from Google base datafeed as i do not want currency showing with , like 1,000.00  rather would like to have it as 1000.00.Any suggestion would be appreciated please.Failed to do it from admin ,or googlebase script.I dont think that controls it.
Adam.

#4 ONLINE   MrPhil

MrPhil
  • Members
  • 4,121 posts
  • Real Name:Phil
  • Gender:Male

Posted 14 June 2012 - 03:23 PM

It sounds like your server is configured for a European-style numeric formatting, using , as the decimal separator. Meanwhile, your data feed is using , as a thousands separator. I would check with your host about numeric formatting in PHP -- maybe you need to add something to your master language file to override the server's default settings.

Once you have that taken care of (using . as the decimal separator), you can deal with Google supplying , in your numbers. You would probably have to add some PHP code in whatever is processing the Google feed, to strip out commas from the number:
$price = str_replace(',', '', $price);
If you want/need to change the decimal separator in the data from . to , you can then:
$price = str_replace('.', ',', $price);