Discussions

How to get number of sold for an item?

Hi all,

Do anyone have idea how to get the number of sold for a product?

Thanks.

Posted: Jun 29, 2011

Comments

latulipeblanche on June 29, 2011

What do you mean by "the number of sold" ?

Do you want to show the number of products sold on the site for visitors, or do you want administrators to be able to see this ?

SerialJaywalker on July 13, 2011

You can do it by setting up a view of product line items, adding both the product and order relationships, filtering by order state, turning on aggregation, grouping by Product ID and summing on the line item's quantity field.

Updated to add an attachment. Import the text of that file as a view, and you'll get a report of the number sold at admin/commerce/product_sales.

stephan on September 24, 2012

That sounds like exactly what I need, too. Could you post your views export here?

Thanks,
Stephan