Skip Navigation

[Resolved] Woocomerce get total money spent on products

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1965977

Tell us what you are trying to do?

Hey there i am experimenting with woocomerce and i wonder if this is possible.
I have a user and the user can make a CPT. on this custom post type he can make products. The products are related to the CPT.
This works fine for me. Now the tricky part.
Now i want to show on the Custom post type for that user multiple things:

1. a total sum of the money he made from all his products. (like an addup from all product prices of the sold products)
2. orderdetails (Name, zipcode, adress...) from all orders to his products.
3. the total number of sold products from him. (like he sold 2 from product A and 4 of product B = 6 items in total)

Maybe there is a possibility in building a shortcode from a wpquery e.g. for 1. & 3?
Hope this is makeable!
Thank you.

#1966489

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no native feature available for the options you shared.

You will require to add custom shortcode that should return the total sum.

Please check the following link that may help you:
1. a total sum of the money he made from all his products. (like an addup from all product prices of the sold products)
- https://stackoverflow.com/questions/30979770/how-to-get-total-sum-of-orders-by-a-user-in-woocommerce

3. the total number of sold products from him. (like he sold 2 from product A and 4 of product B = 6 items in total)
- hidden link
- https://docs.woocommerce.com/document/product-sales-count/