[Resolved] Getting correct Sum to show up on Danko Theme Fundraising Counter
Got a complicated question!
On our website: coastalfootprint.org
There is a big and proud counter for the funds that have been raised. While it is awesome, it is doubling our total on us (giving us a false sense of accomplishment!)
Here is what I found for the outputs for the numbers:
$querystr = “SELECT SUM(mc_gross) FROM ” . $wpdb->prefix . “paypal_transactions”;
$pageposts = $wpdb->get_results($querystr, ARRAY_A);
$transaction_sum = $pageposts [“SUM(mc_gross)”];
$transaction_sum = round($transaction_sum,0);
$transaction_array = str_split($transaction_sum_str);’
The thing is, the “paypal_transactions” table that it is pulling its sum from has “completed” and “pending” entries – the pending doesn’t get deleted when a transaction is completed. So, for instance, if a person donates $100, the resulting sum would spit out $200, because the formula is totaling both the “completed” and “pending” transaction entries. But I don’t have a clue on how to change the formula to just total the “completed” transactions.
- The topic ‘[Resolved] Getting correct Sum to show up on Danko Theme Fundraising Counter’ is closed to new replies.