But that is showing No Items Found as the result. When I remove the query filter from the view, the names on all orders display as expected, but the option on the second product attribute does not display. So I'm having 2 problems with using Woocommerce attributes on this view.
I can provide admin access and provide the URLs to all Views and the page where the views are displayed.
We have a registration product where there is an option that is a product attribute to register for a 3-day event or a 6-day event. We just want to display a list of all people that registered for the 3-day event in one view, then all people that registered for the 6-day event in another view.
Maybe this can be better done through conditional output instead of a query filter. I just tried that as well after removing the query filter and it is not displaying any results either. I'm not understanding why this isn't working.
The billing names are working fine on their own, but when I add the conditional, it isn't working and the attribute-pa-rv-site attribute field isn't working at all. So I'm having problems getting things to work based on attributes completely.
If you go to this page, you'll see what I'm trying to do.
hidden link
The Volunteers functionality is fine because those are generated through a Toolset post form. But the Riders functionality is pulling from Woocommerce orders.
If I remove the conditionals from the 3-day and 6-day Rider views, then it is showing the names of all people that have ordered anything in our store. If the conditionals would be working, there should only be one name under the 6 day list right now.
Your View is querying—and iterating over—orders, not products.
Product attributes are assigned to products, not to orders.
It isn't possible to modify a WP_Query polling order posts to filter by a property of something else.
Nor can you use a conditional shortcode to test product attributes when the current post being iterated over is an order, because orders don't have product attributes.
As I suggested in the other ticket you could run custom logic to determine which orders contain the relevant products and then use the post__in parameter to limit the order query to only those orders. (The logic for the query will be bespoke, but you can still take advantage of Views to generate the output for the matching orders.)
Alternatively, if you wanted to go down the wpv-conditional route, you could register a custom shortcode to test whether any of the products of the current order have the specified product attribute assigned and then use that custom shortcode for your conditional tests.
OK, I haven't received a reply from Beda Schmid yet. I'll add mention of this ticket to what I asked him about. If he doesn't reply, is there any other approach we can do to get these two tickets done? I'm reluctant to approach any of your other contractors absent a ratings/reviews system in place. I can get a quote from Codeable though. We'd MUCH rather pay someone with your team to handle this though as we've always been very happy with the results on the tickets where you have been able to provide custom code for us.
I'm sorry, but company policy is that time off is time off, and doesn't permit taking on additional work outside of normal hours.
If you don't get anywhere with Beda using a reputable coder for a non-Toolset solution is not a bad idea, given the changes in WooCommerce relating to order database storage. Otherwise you will always need to run WC in legacy/compatibility mode so that it can work with Toolset.
Question. I've contacted Codeable about the matters where you advised to get a contractor. They have asked me to send them the Toolset plugin for them to analyze what needs to be done before providing a cost estimate. Is it OK for me to get that to them? I don't want to run afoul of our license use with you.
It is not something that is explicitly prohibited in the terms and conditions, and were you to make your site available to them (which I expect you will need to if you proceed) they would have access to all of your themes and plugins in any case.
Please do what you need to be able to reach a solution for this.
They just want to look at it on their side and asked me to send the .zip file. I'll tell them to make sure to delete it when done. It won't be connected to our account/their development site. Thanks.
The topic ‘[Closed] View to show Woocommerce orders with a query filter on an attribute option?’ is closed to new replies.