View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006084 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2015-03-12 17:16 | 2024-01-24 08:26 |
Reporter | tjungcl | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 6.4.0 | ||||
Summary | 0006084: oxprice smarty plugin not working with german number format | ||||
Description | if the new oxprice tag gets a price parameter in German number format "12,34", for example from the (deprecated) formatCurrency function from some old module, the result is an empty string. So, it does not happen, if everything is purely numeric. A check whether $sPrice is not numerical but can be parsed in the current languages number format would help in all other cases. | ||||
Tags | No tags attached. | ||||
Theme | All | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
This is now no longer the case. Instead https://github.com/OXID-eSales/oxideshop_ce/blob/712f4826d2190c33ad712ee028f5feb582d13133/source/Core/Smarty/Plugin/function.oxprice.php#L37 would now cut the given price... php > echo floatval("12,34"); 12 php > echo floatval("12.34"); 12.34 At that point it is also not even clear what the correct decimal separator would be and the default would be used. This makes floatval especially dangerous. Severity only left at minor as this should not happen with current code using the Price object. Nonetheless this might be an additional problem for legacy code. |