Re: killer-format in cart

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17048
interpreted = N
texte = >European notation: >Price-field in database 24,7 (with comma) >For display I use 24,70 >But in the cart I get 24 >Oops. All numbers behind the comma are snipped off. >I use formulas.db for the price, tried to format there, had no luck. >How can I control the format in the cart? > >Not as bad as the above one, but still to solve: >Could anyone get these european thousands-format working? >My format in the database is like 12345,6 (with comma). >Formatting 12345,60 works, but when I try 12.345,60 (with point for >thousands), WebCat gets angry and divides by 1000. >I tried with English notation in the database, but no chance for the p.oint.WebCatalog always expects numbers to start in English format (sorry, we had to pick one or the other). This means that for price and math and type=NUM operations, the number must look likeGood: 123 Good: 123.45 Good: 1000000.99 (notice that commas are never allowed, even as a thousands separator) Bad: 123,45 Bad: 1,000,000.45You can of course format the number differently when you display it:[format thousands]1000000.99[/format] -> 1,000,000.99 [format thousands ,2f]1000000.99[/format] -> 1.000.000,99But these are for *display* only: WebCatalog cannot interpret them as numbers.So you have a couple of options when you put prices into your database:1) put prices in English format always, and use [Format] to display as European on your web site. The OrderFile needs them in English format, too. 2) put prices in European format always, and change your [price] formula to convert .-> and ,->. using a custom [ConvertChars] database. This conversion should strip thousands separators (. in European) to nothing, and change decimal separators to ., thus turning them into English format.In both cases, the final results of the formula must be in English format. In no case should you ever use thousands separators within numbers.Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: killer-format in cart (PCS Technical Support 1998)
  2. killer-format in cart (Peter Ostry 1998)
>European notation: >Price-field in database 24,7 (with comma) >For display I use 24,70 >But in the cart I get 24 >Oops. All numbers behind the comma are snipped off. >I use formulas.db for the price, tried to format there, had no luck. >How can I control the format in the cart? > >Not as bad as the above one, but still to solve: >Could anyone get these european thousands-format working? >My format in the database is like 12345,6 (with comma). >Formatting 12345,60 works, but when I try 12.345,60 (with point for >thousands), WebCat gets angry and divides by 1000. >I tried with English notation in the database, but no chance for the p.oint.WebCatalog always expects numbers to start in English format (sorry, we had to pick one or the other). This means that for price and math and type=NUM operations, the number must look likeGood: 123 Good: 123.45 Good: 1000000.99 (notice that commas are never allowed, even as a thousands separator) Bad: 123,45 Bad: 1,000,000.45You can of course format the number differently when you display it:[format thousands]1000000.99[/format] -> 1,000,000.99 [format thousands ,2f]1000000.99[/format] -> 1.000.000,99But these are for *display* only: WebCatalog cannot interpret them as numbers.So you have a couple of options when you put prices into your database:1) put prices in English format always, and use [format] to display as European on your web site. The OrderFile needs them in English format, too. 2) put prices in European format always, and change your [price] formula to convert .-> and ,->. using a custom [convertchars] database. This conversion should strip thousands separators (. in European) to nothing, and change decimal separators to ., thus turning them into English format.In both cases, the final results of the formula must be in English format. In no case should you ever use thousands separators within numbers.Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ PCS Technical Support

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

OT: Need (a tiny bit) of help setting up MySQL (2000) Protect and Serve (1999) Using Plug-In while running 1.6.1 (1997) [WebDNA] JSON parsing (2010) Configuring E-mail (1997) [WebDNA] Not even sure what to ask for help on. . . :( (2008) WebCatalog can't find database (1997) Download Question (1997) PIXO support (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) 2.0 Info (1997) Help name our technology! (1997) mail test (1997) General WebCatalog Questions (1997) send mail problem? (1997) 2.0Beta Command Ref (can't find this instruction) (1997) [OT] Regular Expressions (2003) WAP (2000) blank page from template (1997) Loosing Quantity (2000)