Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

http://i.stack.imgur.com/SNK0h.png

Anyone has a solution for this?

share|improve this question
add comment

2 Answers 2

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
add comment
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
add comment

Your Answer

 
discard

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.