want a comma (instead of a point) in the discount value

Posts: 3
Joined: 08/07/2007

Hi Al,
thank you for this workaround, it works for me.
If i change the line

<?php
$node_field
[0]['value'] = round((1 - ($node->sell_price / $node->list_price)) * 100, 0);
?>
to
<?php
$node_field
[0]['value'] = round((1 - ($node->sell_price / $node->list_price)) * 100, 2);
?>
i get a discount of "50.56 %" but i want a discount of "50,56 %" ?
I mean the comma in the discount...

In admin/store/settings/store/edit/format
my current format is: € 1.000,12 and
Number of decimal places: 2

Any idea to solve this?

PS. in my node-product.tpl.php i show this field with

<?php
print $node->field_discount[0]['value']
?>

Display % discount off List Price By: interactiveallstar (6 replies) Wed, 04/23/2008 - 06:28