Order Totals

Get gross order totals, and filter orders using standard channel:entries parameters. If used as a single tag, it will output the sum of the totals. If used as a tag pair, you will have the variables listed below.

Table of Contents



The sum of the order totals that match your filter.



The sum of the order subtotals that match your filter.



The sum of the order tax amounts that match your filter.



The sum of the order shipping charges that match your filter.



The sum of the order discount amounts that match your filter.



The number of orders that match your filter.



All orders.

{exp:cartthrob:order_totals limit="999999999"}

Orders from January 2010.

{exp:cartthrob:order_totals year="2010" month="01"}
Total: {total}

Orders by member whose id is 1.

{exp:cartthrob:order_totals author_id="1"}
Total: {total}

Orders from 2011 whose status is paid.

{exp:cartthrob:order_totals channel="orders" status="paid" year="2011"}

Since order_totals uses channel:entries tag as its base, you can use the power of dynamic urls to power your reporting.

Did you know that you can tack on YYYY/ YYYY/MM/ YYYY/MM/DD to your url to dynamically grab entries/orders from those dates?

site.com/order/totals/2011 site.com/order/totals/2011/10 site.com/order/totals/2011/10/01