Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: price format for Germany
#14
Quite a regular
Quite a regular


See User information
hi john,

now works perfect

very thanks

Posted on: 2010/9/27 7:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#13
Webmaster
Webmaster


See User information
I forgot the addlisting one. I made the change around line 93 :

$price = str_replace(array(','), '', $_POST["price"]);

changed to

$price1 = str_replace(array('.'), '', $_POST["price"]);
$price = str_replace(array(','), '.', $price1);

just like you said you did, but for me it works. Are you sure it is not a cache problem? try clearing your browser cache, and also try clearing your Xoops cache files.

John

Posted on: 2010/9/27 5:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#12
Quite a regular
Quite a regular


See User information
hello john, thanks for you help.

the fix works good, but the addlisting.php has a problem

modify for user and admin works perfect.

make a user a new classifieds and use this format

1.500,40 EUR then is in display by admin this resultat

1,50 EUR

in my addlisting php is this

$price = str_replace(array(','), '.', $_POST["price"]);

is this correct ?

i have overwrite with this in the addlisting.php

$price1 = str_replace(array('.'), '', $_POST["price"]);
$price = str_replace(array(','), '.', $price1);

this works not

you can me help, Thanks







Posted on: 2010/9/25 5:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#11
Webmaster
Webmaster


See User information
O.K. Try this.

Just change these three.

1.
admin/index.php
function - ListingValid
around line 649 look for this line:

$price = str_replace(array(','), '', $price);

change it to this:

$price1 = str_replace(array('.'), '', $price);
$price = str_replace(array(','), '.', $price1);



2.
admin/index.php
function - ModifyAdsS
around line 584 look for this line:

$price = str_replace(array(','), '', $price);

change it to this:

$price1 = str_replace(array('.'), '', $price);
$price = str_replace(array(','), '.', $price1);



3.
modify.php
around line 79 look for this line:

$price = str_replace(array(','), '', $_POST["price"]);

change it to this:

$price1 = str_replace(array('.'), '', $_POST["price"]);
$price = str_replace(array(','), '.', $price1);



That should do it. Let me know.

John




Posted on: 2010/9/24 19:27
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#10
Quite a regular
Quite a regular


See User information
hello john,

thanks for help.

I have changed as you've described it.

it works well but with errors.

example:

use the user this format

2,58 EUR works this fine

use the user this format for thousensd

2.500,58 EUR this works not

the result is:

2,50 EUR

it works if the user use this format

2500,58 EUR but modify the user, this format, he shows in edit mode because of format 2.500,58 EUR save the user this is the price

2,50 EUR again.

Problem is in thousend format the german user use this

2.500,58 EUR = 2500 EURO and 58 CENT

2.500,58 EUR in DISPLAY

save this is

2,50 EUR = 2 EURO and 50 CENT this is not good

you can help me for the thousend format thanks

greet host2

you can test this under:

www.gothaer-anzeigenmarkt.de

you make a classified and edit this with the price format 2.500,58 Thanks


Posted on: 2010/9/24 10:35
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#9
Webmaster
Webmaster


See User information
I think I have figured this out, there are a few changes, some you already made but I am listing them all in case someone else needs this too.


1.
addlisting.php
around line 93 look for this line:

$price = str_replace(array('.'), ',', $_POST["price"]);

change to this:

$price = str_replace(array(','), '.', $_POST["price"]);

2.
admin/index.php - function IndexView
around line 230 look for this line:
$price = number_format($price, 2, ".", ",");

change to this:

$price = number_format($price, 2, ",", ".");

3.
admin/index.php - function ListingValid
around line 658 look for this line:

$price = str_replace(array(','), '', $price);

change it to this:

$price = str_replace(array(','), '.', $price);



4.
admin/index.php - function ModifyAds
around line 405 look for this line:

$price = number_format($price, 2, ",", ".");

change it to this:

$price = number_format($price, 2, ",", ".");



5.
admin/index.php - function ModifyAdsS
around line 593 look for this line:

$price = str_replace(array('.'), ',', $price);

change it to this:

$price = str_replace(array(','), '.', $price);



6.
blocks/ads_2.php
around line 593 look for this line:

$price = $myts->htmlSpecialChars($myrow["price"]);

change it to this:

$price = number_format($myrow["price"], 2, ",", ".");


7.
index.php
around line 235 look for this line:

$price = number_format($price, 2, ".", ",");

change it to this:

$price = number_format($price, 2, ",", ".");



8.
catview.php
around line 218 look for this line:

$price = number_format($price, 2, ".", ",");

change it to this:

$price = number_format($price, 2, ",", ".");



9.
members.php
around line 218 look for this line:


$price = number_format($price, 2, ".", ",");

change it to this:

$price = number_format($price, 2, ",", ".");



10.
modify.php
around line 82 look for this line:

$price = str_replace(array(','), '', $_POST["price"]);

change it to this:

$price = str_replace(array(','), '.', $_POST["price"]);


11.
modify.php
around line 185 look for this line:

$price = number_format($price, 2, ".", ",");

change it to this:

$price = number_format($price, 2, ",", ".");



12.
viewad.php
around line 159 look for this line:

$price = number_format($price, 2, ".", ",");

change it to this:

$price = number_format($price, 2, ",", ".");



Let me know.how it works.

John








Posted on: 2010/9/24 5:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#8
Quite a regular
Quite a regular


See User information
yes is correct

german user use a comma but by the thousand number use point and comma see example.

2,50 EUR or

12.500,40 EUR


if make a german user a classified then use a comma, thats is the problem the german user use comma and classifieds change this to a point example

2,50 EUR change this in 2,500.00 this is false

thanks for help




Posted on: 2010/9/23 14:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#7
Webmaster
Webmaster


See User information
I started to look at this but then I have not had any time. I will try to look at this tonight.

John

Germany really uses a comma as a decimal point? That I don't understand.


Posted on: 2010/9/23 6:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#6
Quite a regular
Quite a regular


See User information
hello john, you can help me ?

Posted on: 2010/9/22 8:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: price format for Germany
#5
Quite a regular
Quite a regular


See User information
hi john,

this works not good

i make a price with 5,90 and the admin view for accept the anounce is 5.00 accept this is the result 5,00

i would 5,90






Posted on: 2010/9/15 9:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]


Login
Username:

Password:

Remember me



Lost Password?

Register now!
 
Main Menu
 
Who's Online
3 user(s) are online (3 user(s) are browsing Forum)

Members: 0
Guests: 3

more...
 
Donat-O-Meter
Make donations with PayPal!
Stats
Goal: $25.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $25.00