I have a numeric value (£) generated by sales - each sale creates a value in an EE field called {order_total}. What would be the best way to total these values on a ‘stats’ page to give the sum for all entries?
Running EE 1.72
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 13, 2012 6:35am
Subscribe [1]#1 / Apr 13, 2012 6:35am
I have a numeric value (£) generated by sales - each sale creates a value in an EE field called {order_total}. What would be the best way to total these values on a ‘stats’ page to give the sum for all entries?
Running EE 1.72
#2 / Apr 13, 2012 10:33am
Hi Liam,
Are you using any ecommerce module? you can write query to find sum total entries of any channel.
Could you please share more info so that we can tell a proper solution.
Best Regards,
Bhashkar
#3 / Apr 13, 2012 12:17pm
Hi Bhashkar
Thanks for your reply. The Ecommerce module is a little irrelevant in this example as I also want to do something similar on another site that has interger fields for a set of entries (not sales in this case - just numeric values).
Let’s say it was completely hypothetical - So basically we have a weblog full of entries. In those entries there is a field that contains numeric values. I want to add all those integers to a total and output it as live data on the site in the form of a statistic. I’ve had a think but can’t see a native way to do it, and the maths plugins seem to better handle single values not a list generated by the weblog tag pair - which makes me think (as you pointed out) a php query might be the answer here.
Thanks, Liam