diff --git a/fields/field.price.php b/fields/field.price.php index 6d31b25..684d516 100644 --- a/fields/field.price.php +++ b/fields/field.price.php @@ -137,8 +137,16 @@ public function appendFormattedElement(&$wrapper, $data, $encode=false) { public function prepareTableValue($data, XMLElement $link = null) { if (empty($data)) return; + setlocale(LC_MONETARY, $this->get('locale')); - return money_format($this->get('format'), General::sanitize($data['value'])); + $value = money_format($this->get('format'), General::sanitize($data['value'])); + + if ($link) { + $link->setValue($value); + return $link->generate(); + } + + return $value; } /*-------------------------------------------------------------------------