1

I am running a ticket sales setup with store for an online event and would like to display the total number of products sold via a template to feed a live display of total tickets sold, is there any way for me to display the total number of products sold?

Currently I could display ALL products sold and not just a set of products, but in the future dates spans as well as specific products would be nice to define.

1

If you just want the total number of a certain product sold, you can do that using EE's built in query module and a bit of SQL:

select sum(item_qty) as qty_sold
from exp_store_order_items
join exp_store_orders on exp_store_order_items.order_id = exp_store_orders.id
where order_completed_date > 0
  and entry_id = 123

Note: if you are using Store 1.6 you will need to replace exp_store_orders.id above with exp_store_orders.order_id.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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