Is there some rule for entering decimals in VM administration? Should I use comma (common in EU) or dot (US style :) ? When I use the comma - everything works fine with product price... e.g. - in administration price is entered like 14,99 and displayed 14,99€
But when I enter 2,50 as shipment cost in shipment methods - in cart is displayed only 2,00€
When I enter 2.50 - user can see correct price 2,50€
Is it bug or not?
(using VM 2.0.22, Joomla 2.5.9)
Dot.
Did you saw individual currency settings in VM backend?
Yes I did... And did you understand me?
There is nothing that can affect this behaviour and nothing that explains why is possible to use comma and in other forms are accepted only dots.
All currencies are disabled, only active currency is Euro and decimal separator is comma. (i think that it may be related only to displaying decimals, not for entering)
OR, am I missing something?
Quote from: pixelofficer on August 29, 2013, 18:49:21 PM
There is nothing that can affect this behaviour and nothing that explains why is possible to use comma and in other forms are accepted only dots.
Could you be more specific?
How can i be more specific? When I edit for example products - their price - it is ok to use comma as decimal separator and everything works
When I want to edit the shipment cost - I must use dot as decimal separator...
why?
as far as i know - decimal separator in currency settings affects only template / not the administration
Hello
You have to do this in the file plugins/vmshipment/weight_countries/weight_countries.php
replace the code
/**
* @param $method
*/
function convert (&$method) {
//$method->weight_start = (float) $method->weight_start;
//$method->weight_stop = (float) $method->weight_stop;
$method->orderamount_start = (float)$method->orderamount_start;
$method->orderamount_stop = (float)$method->orderamount_stop;
$method->zip_start = (int)$method->zip_start;
$method->zip_stop = (int)$method->zip_stop;
$method->nbproducts_start = (int)$method->nbproducts_start;
$method->nbproducts_stop = (int)$method->nbproducts_stop;
$method->free_shipment = (float)$method->free_shipment;
}
by the code
/**
* @param $method
*/
function convert (&$method) {
//$method->weight_start = (float) $method->weight_start;
//$method->weight_stop = (float) $method->weight_stop;
$method->orderamount_start = (float)str_replace(',','.',$method->orderamount_start);
$method->orderamount_stop = (float)str_replace(',','.',$method->orderamount_stop);
$method->zip_start = (int)$method->zip_start;
$method->zip_stop = (int)$method->zip_stop;
$method->nbproducts_start = (int)$method->nbproducts_start;
$method->nbproducts_stop = (int)$method->nbproducts_stop;
$method->free_shipment = (float)str_replace(',','.',$method->free_shipment);
}