VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Problems and bugs
 VPASP on European server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

22 Posts

Posted - April 04 2007 :  03:34:47  Show Profile  Reply with Quote
I am using VPASP on italian windows Server 2003.
If I set xLCID=1040 and xconverteuropeannumbers=Yes and I go to edit a product I obtain as a result in the cprice field for example: 105,99 (euro).
After I go to save it the cprice results in 10599 (euro) because the comma is not set by VPASP as decimal point.
If I use the dot instead, VPASP saves it correctly.
But each time I wish to edit a product I must remember to convert the comma in a dot and it is not a good procedure.
How I can correct this?
TIA roberto

VP-ASP New User

107 Posts

Posted - February 25 2009 :  10:06:16  Show Profile  Visit manilow's Homepage  Reply with Quote
I met the same problem. xlcid set to 1036 the prices were displayed correctly, for example: 1 234,56 (I put the behind the amount).

However, when adding or updating products, the amounts were multiplied by 100; using a dot as decimal point, an error was displayed asking for a numeric value.

To fix this, I added the cCur function in line 2176 of the shopa_addproduct.asp file:

pupdatefield "cprice", ccur(curcprice)

It seems to work fine this way.
Go to Top of Page

Senior Member

United Kingdom
1898 Posts

Posted - February 25 2009 :  11:12:11  Show Profile  Visit devshb's Homepage  Reply with Quote
I've also had similar problems (european server, eg germany which uses commas, but want to display things in uk formats, ie decimal points; also want the option to be able to display things with either of those formats from the customer and admin sides depending on which ccy/language is being chosen by the customer/admin user. (eg for a site which sells to, say, the uk, and also to germany or italy etc, via a german server)

I've tried loads of things on this, and built a test file to see at which point things go wrong with the various different lcid settings and entering differently formatted amounts.

The core problem seems to only happen when you have a field/value which is retrieved as a text value (eg reading a field without converting it to a number, or setting something to a literal value like "1.2" etc). When things are explicitly converted to numbers it all works fine as long as the right lcid is set.

The xconverteuropeannumbers option (which corrects this problem) only gets used in a handful of instances. The customer side is fairly well sorted out, but the admin side goes horribly wrong if you have a mis-matching session lcid with the server's region.

Manilow's solution is the kind of thing that I was thinking about too, but it's the last resort (the rest of admin is still broken when it comes to anything that does direct cursor updates from field derived values), I'd still like to find out how to switch things fully between formats without having to butcher the cart, but having looked at the code I don't think it can be done without doing the kind of changes across the board in admin that manilow mentions. If anyone knows different, please let us know!

(By switching the lcid to mis-match against the server's region, the only things that seem to break is direct cursor updates from field-driven values; everything else works fine in the internal calculation aspects etc)

My test file was generic asp, totally outside vpasp, but it showed where the problems occur; trouble is I haven't managed to find a generic top level setting that can sort it out. If the value doesn't get explicitly converted/casted then it always ends up going wrong regardless of the lcid settings in the file.

Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons

Edited by - devshb on February 25 2009 11:22:19
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000