View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005800 | OXID eShop (all versions) | 1.03. Basket, checkout process | public | 2014-06-23 13:13 | 2014-06-27 13:42 |
| Reporter | ddpkts | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Summary | 0005800: Wrong prices inserted into DB when finishing order, when default locale is changed in PHP | ||||
| Description | If I change locale (LC_ALL or at least LC_NUMERIC) in php: setlocale(LC_ALL, "lt_LT.utf8") // lt_LT, de_DE, etc. Numbers' decimal separator becomes comma (,) instead of dot (.) oxPrice object returns comma separated price values: oxPrice Object ( [_dBrutto:protected] => 11,9 ... ) delivery costs oxprice object: oxPrice Object ( [_dBrutto:protected] => 7,9 ... ) When finishing/confirming order and inserting into DB, cents are being lost: e.g. oxorder sql insert: Insert into oxorder set ... oxtotalnetsum = '9,83',oxtotalbrutsum = '11,9',oxtotalordersum = '19,8',oxartvat1 = '21',oxartvatprice1 = '2,07', ... oxdelcost = '7,9',oxdelvat = '21' ...; oxorderarticles sql insert: Insert into oxorderarticles set ... oxnetprice = '9,83',oxbrutprice = '11,9',oxvatprice = '2,07',oxvat = '21', ... oxprice = '11.9',oxbprice = '11,9',oxnprice = '9,83', ... oxweight = '0.9', ... ; And I think you know what happens when you try to insert X,XX formatted numbers into MySQL. oxPrice should return dot separated prices. | ||||
| Steps To Reproduce | set locale e.g. in config.inc.php: setlocale(LC_ALL, "lt_LT.utf8"); // or de_DE.utf8 | ||||
| Additional Information | locale should be installed in server, to check if present: > locale -a to install: > locale-gen lt_LT.utf8 | ||||
| Tags | No tags attached. | ||||
| Theme | Azure | ||||
| Browser | All | ||||
| PHP Version | any | ||||
| Database Version | any | ||||