View Full Version : Price format problems
August 25th, 2009, 11:59 AM
I need to modified the price format in 2 ways:
- Remove completely the commas and dots from it and
- remove the decimals from the price end
original price format: 200,00
what we need: 200
(The price search don't work correctly until then...)
How can I change this?
August 25th, 2009, 12:21 PM
Not sure what you mean by price search does not work. It works fine in the default code
All Ads - PhotoPost Classifieds (http://www.omegatron.net/classifieds/showcat.php?mcats=all&si=&what=allfields&name=&when=0&whenterm=&dist=&radius=50&low=0.00&high=500.00)
We format a price for display on the front end to different currency formats but always in the database it is stored as 200.00 thus as long as you use the code as it is coded and use the low and high price dropdowns I see no issue with how things work because it properly returns results.
August 25th, 2009, 06:08 PM
Sure: not exactly the "price search":
I need price format without decimals and commas - displays it wrongly by listing ("Sort by") and yes, the price range search too.
Check: Bikemag Apró (http://piacter.bikemag.hu)
(On my site the price range search option still uncommented in the code...)
August 25th, 2009, 06:25 PM
I really dont think you understand what I am saying.
However you have modified your code so until you replace it with the current unmodified code we can not provide support.
Look at your search page it is not right.
Keresés - Bikemag Piactér - a kerékpár apróhirdető (http://piacter.bikemag.hu/search.php)
I dont see the normal looking classifieds search page there and if you alter things any unexpected behavior can be caused by your changes.
Now if say I mimic a search on your site like so it finds ads based on a high and low price range. As I stated no matter how things are formatted for display which happens after the info is grabbed the price is always stored in a mysql database in number format which is 0.00
All Ads - Bikemag Piactér - a kerékpár apróhirdető (http://piacter.bikemag.hu/showcat.php?mcats=all&si=&what=allfields&name=&when=0&whenterm=&dist=&radius=50&low=25.00&high=50.00)
eladó dc és element sapi akció - Bikemag Piactér - a kerékpár apróhirdető (http://piacter.bikemag.hu/showproduct.php?product=246629&cat=107)
If your adding another type of currency make sure to add the correct info so its formatted correctly. All currencies for display that I know of use a . or , for display purposes.
August 26th, 2009, 12:14 PM
OK, try other method:
Please help, how can I change the price format
Thank you in advance.
August 26th, 2009, 12:31 PM
You would have to modify and remove the number_format commands in showproduct and showcat php files although I dont see why you would want to do that and we can not assist with code modification questions.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.