Home › Toolset Professional Support › [Resolved] New: Added support to query Woocommerce orders with Views.
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 |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Tagged: Views, Views plugin
This topic contains 10 replies, has 2 voices.
Last updated by Noman 7 years, 1 month ago.
Assisted by: Noman.
Hello I just read the changelog of the new WC Views Update.
It says: New: Added support to query Woocommerce orders with Views.
Does this now allow me to display customer product order information on the frontend of the accompanying product, which could be useful for crowdfunding plattforms?
Regards,
Nicholas
Hi Nicholas,
Thank you for contacting Toolset Support. Yes since WooCommerce 3.0+ , there are new filters available related to WC orders, which allows us to display orders on the frontend using Toolset WooCommerce Views (but there can be some restrictions as this is a very new feature at moment).
Some details as I found in our internal system is:
1. It's now possible to display WooCommerce orders with Toolset Views with no additional setup needed or custom coding. See screenshot 1.jpg.
2. It's also possible to display the ordered products in the looped WooCommerce orders (using Toolset Views) using a new shortcode called:
[wpv-ordered-product-ids]
See screenshot 2.jpg
This shortcode should only be used in a Views loop that outputs WooCommerce orders. If its used in single products or products, it won't output anything but no fatal errors.
3. It's also possible to display customers that bought a certain products. This is possible by querying the orders then matching the loaded products that is belonging to the order using this conditional in Views:
[wpv-conditional if="( wpv_woo_product_belongs_to_this_order() eq '1' )"] <li>[wpv-post-field name='_billing_first_name'], [wpv-post-field name='_billing_last_name']</li> [/wpv-conditional]
This built-in WooCommerce Views function wpv_woo_product_belongs_to_this_order() will return true if the loaded product (example in a single product page) belongs to the order being queried. See screenshot 3.jpg
I hope this info is sufficient and will help you understand this feature. Thank you
woooow this is a major update. I was waiting for this feature for so long.
This is great.
Why do you keep this update so lowkey and not update all the tickets regarding this subject?
Regards,
Nicholas
We usually update tickets that are in status of "Escalated" or "Fixed in next release", however we do not update tickets that are marked as closed or resolved. If you have any pending ticket for this issue please followup there and the supporter should be able to communicate further.
If you would like we can also try to request a doc for this new feature.
Thank you
If you do not update tickets marked as closed or resolved why do you tell your customers then to close tickets if there is not solution for it out yet? Maybe you guys can keep tickets open regarding feature requests so customers will be informed once the new feature is out, because often times it's not very clear in the changelog and only briefly described there.
This way I couldn't get informed, even though this is very important.
I can't tell most of the times what the updates in the changelog files are about. Maybe you can set up a page where they are described more thoroughly. Please let me know if a page like this already exists yet?
Please take this as feedback.
#1 Furthermore I don't quite understand the use of: [wpv-ordered-product-ids]
This just outputs a number if I place it inside the [wpv-conditional if="( wpv_woo_product_belongs_to_this_order() eq '1' )"] conditional.
Is this shortcode supposed to go inside the conditional? What's the use of it?
#2 Also, what if a customer bought the product multiple times?
How do I show how often a customer bought the product?
I.e.: John Doe bought the product 2 times, instead of displaying his name twice?
#3 Also how do I add the customer avatar?
#4 it's nice that I can display custom fields created for the woocommerce checkout, but again these fields are repeated if they occur more than once. Instead of Customers selected yellow 5x times, the word yellow is literally displayed 5 times.
Hello Nicholas,
We do track recent tickets and if there is any feature request goes into approval or production at same time but if some tickets is old like 1 month or few months old and the feature was implemented months or years later -- we can't track that one. Tickets are closed automatically if there is no activity for few weeks.
Thanks for the feedback. We have this page where we add more details for major releases: https://toolset.com/version/
In most cases we inform clients and explain things in docs, blog posts and emails, you can subscribe to our blog for news and feature updates: https://toolset.com/blog -- It's not possible to explain every single feature mostly simple ones but we are always open for doc suggestions and we try to publish in form of docs in such cases.
For issues #3 and #4 please kindly open a new ticket if you need help with this. This will help other users with similar problems to find solutions when searching the forum, I am not allowed to handle multiple issues in the same ticket as per support policy. https://toolset.com/toolset-support-policy/
I will work through your other Order related questions and will get back to you. Thank you
Hello Nicholas,
To display these orders on a page and do various things that I shown in my screenshot, these require more steps & combination than simply creating a View for Orders. We have a documentation under moderation at moment and this will be published soon, I hope you can wait for that, it will explain the process for displaying orders.
1. The number that this shortcode outputs [wpv-ordered-product-ids] is basically product ID.
2. For multiple purchases from the same user I think it will rely on WC and will most likely display the orders twice, once the doc is published you can check that as well and we will move on from there.
I have informed our docs team on this too and hoping that we will get it published at earliest.
Thank you
And I will update you here once doc is published.
Please feel free to followup with me later on if you would like to regarding doc status. Thank you
Thank you Noman.
Regarding question 1 and 2 I am looking forward to reading the documentation, because there are many things that aren't clear to me right now.
I am keeping this thread open because I am hoping you can inform me once the doc is published. Do you mind?
I am already subscribed to the blog and I am also in the facebook group.
Yes sure, I will update you once doc is published. I am changing ticket status to “Fixed in next release” (as this is the closest option we have), so that it does not keep hanging in my main queue. I have setup and noted it down so that once doc is published I will get notification and I will notify you as well. So we are all set for now.
Thank you
Just wanted to post here, that we have the final version of doc released now:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/displaying-more-information-from-woocommerce/