- Issue created by @plusproduit
Hello,
Thank you for this great module.
I'm trying to change the "summarized" currency based on a field (field_currency in the entity).
So far I had only CHF currency, so I did a small change on this function :
function views_summarize_type_currency($data) {
$total = 0;
if (!empty($data) && is_array($data)) {
foreach ($data as $val) {
// This allows for negative values and values w/commas to be added
// correctly.
// $total += (float) preg_replace('/[^0-9\,\.\-]/', '', $val);
$total += (float) preg_replace('/[^0-9\.\-]/', '', $val);
}
$total = number_format($total, 2);
}
$text = t('Total:');
return ['#markup' => '<div class="label">' . $text . '</div> CHF ' . $total];
}
I'd like to get dynamic, how can I get the field_currency value ?
I found this thread but it didn't help me : https://drupal.stackexchange.com/questions/308755/how-to-get-a-rendered-...
Thanks for your help!
Active
1.1
Code