diamond1:
Good morning at all, I can not change the decimals ie I would like the decimal ones to be a spin instead of a point, and miles a point instead of a comma.
In the currency the comma is set to the decimal then it is not zen cart the problem but dpu. Thank you for the reply.
Ps
I installed version 3.07
What is your setting for: Show currency symbols?
If it is true, then all currency related values should be reflected when displaying a price (i.e. a number such as 3000 with a fraction of 1/2 would be displayed as 3.000,5 when using a decimal for the thousands place and a comma (spin) for the part of a number, or if a comma (spin) for the thousands place and a period for the part of a whole it would be 3,000.5).
As to other "units" such as miles/km, DPU should return whatever has been entered. If there is some other "special" conversion to be performed based on what attribute is being addressed then this conversion/handling would need to be incorporated into the includes/classes/dynamic_price_updater.php file. To address this in the sidebox (only place that updates with a specific attribute's option "name" or value "name"), then would suggest that if modifying the displayed attribute that it be handled in the function getSideboxContent with further suggestion of addressing in this "area"
if (is_array($this->shoppingCart->contents[$products[$i]['id']]['attributes'])) {
// while (isset($this->shoppingCart->contents[$_POST['products_id']]['attributes']) && list($option, $value) = each($this->shoppingCart->contents[$_POST['products_id']]['attributes'])) {
foreach ($this->shoppingCart->contents[$products[$i]['id']]['attributes'] as $option => $value) {
$adjust_downloads ++;
$attribute_price = $db->Execute("SELECT *
FROM " . TABLE_PRODUCTS_ATTRIBUTES . "
WHERE products_id = '" . (int)$prid . "'
AND options_id = '" . (int)$option . "'
AND options_values_id = '" . (int)$value . "'");
$data = $db->Execute("SELECT products_options_values_name
FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . "
WHERE products_options_values_id = " . (int)$value);
$name = $data->fields['products_options_values_name'];
At/after this last line ($name = ...) would evaluate the options_id ($option) and options_values_id ($value) to see if either/both should be the one(s) to be manipulated to display an alternate series of comma (spin) and period... Ie. if the option name is miles and has an option_id of 27 and all available option values are numbers, then:
if ((int)$option == 27) {
$name = /* function or code to convert the previous value of $name to use the new units */;
}
Otherwise I am not sure what you mean by the usage of miles in this context because the values presented/calculated by DPU are the cost factors and not some "unit". Such "comparison" or use of units would be or have been a modification to the core coding of ZC.
I guess it could also be possible that a "cost" could be displayed with specific units/decimals by use of the php function number_format described in the php manual here as applicable.
But would need more information to provide further guidance/assistance.