Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Views Summarize module for one of my views. I need to output the field as link and sum them up, but the total is displayed as $0. When I uncheck the output the field as link option, the total is displayed correctly.


Anyone has a solution for this?

share|improve this question

Have you seen this issue on drupal.org: http://drupal.org/node/1880450?

It looks like this is actually a bug in the module - not anything you're doing wrong. However, there seems to be a user-submitted patch that fixes issues with decimals, currency, etc that you can try out...

share|improve this answer
This is great. Thanks a lot. I will take a look at it. – Firyn Feb 21 '13 at 19:46
up vote 0 down vote accepted

I came up with my own solution to this problem. All you need to do is to modify the module file.

Within the foreach ($data as $val) add this right after

if (strpos($val, '</a>') !== false) {
  preg_match('/<a ?.*>(.*)<\/a>/', $val, $value);
  $val = $value[1];
share|improve this answer
Cool. Now, the only problem with modifying the module files directly is that now your module version isn't the same as the one posted on drupal.org, and you'll run into your changes being overriden if you ever update the module! That's why it's better to do a pending patch (as below) or post your modifications to the module's issue queue to be incorporated into the official module. Hope that makes sense!! – Boriana Feb 27 '13 at 0:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.