Query builder for custom Woo query

Hello Louis and team. Firstly, thank you for all your amazing work. Cwicly is quite an impressive piece of software. I hope for the best of success for you with this project, as Gutenberg is indeed the future (for better or worse), and you are ahead of the curve.

I have utilized an IconicWP plugin called “Show Single Variations”, which, as the name implies, shows variations of variable products on the front-end as if they were single products.

I am trying to query these “single variations” using your query builder, and have thus far failed.

Here are some pertinent docs:

  1. I am using method 1 to show only certain variations, as I have no intention of showing every variation site-wide.

  2. If I’m showing variations, I’m hiding the parent.

  3. I’m switching on this setting:

iconicwp [dot] com/docs/woocommerce-show-single-variations/force-add-variations-to-all-product-queries/

to make sure the “single variations” are accessible to the query. Unfortunately, I think this may be the source of the issue. As, according to the Iconic doc there linked, this only affects the front end. Your query builder in the back end, therefore, will not be able to access the “single variations”.

(Note: I had to strip the third link because “new users can only have two links in a post”)

Thank you in advance for any assistance or direction which you can provide.

1 Like

UPDATE:

Got the query to work, but only on the front end, as was expected.

Note that selecting “Products” in the dropdown next to the “Query ID” number will not work, for whatever reason.

After instead choosing “Posts”, as shown, and then choosing “Post type” of “Products”, I was able to query only the “Single Variations” I want, by “Product Tag”, under the “Taxonomy Query”. The loop shows perfectly on the front end with these settings.

However! On the back end, since the query does not work there, Cwicly is blocking me from removing, adding editing, etc., any blocks inside the “Query Template”. The “Query Template” block is essentially disabled.

As explained above, the plugin I’m using, “Show Single Variations”, will not enable the “Single Variations” that it creates to be queryable on the backend, only the front end.

What this means is that if I have any design edits I need to make to the query loop while it is in this disabled state, I need to first amend the query to something that works in the back end, make my design edits, and then switch the query back. I’m sure you’ll agree that workflow is sub-optimal.

Are there any possible improvements to this workflow that you might be able to suggest?

Thank you again!

I’m also working on a project that would benefit hugely from showing product variations as separate items in a query. I’m glad you found a workaround but am a little hesitant to implement it due to the clunkiness in the workflow. I know this is a rather advanced feature so I’m not complaining but definitely excited for this in time. +1 for the suggested fixes and expansion on this capability.

Thanks @james !

Hello sir. In my latest tests, the workaround isn’t necessary as described. Cwicly team has since updated the Query Builder; and reconfiguring your query is now possible in the scenario I’ve described. However, the “simple variations” will still only render on the front end, and not in Cwicly builder. Not optimal; but I don’t mind. At least now we can modify the query config without having to step through what I described initially.

Ah I see thanks for letting me know @james .

I initially thought you were mimicking the third party plugin functionality to “Show single variations” that you mentioned - all with native Cwicly features, but now re-reading your initial post - I now see that you are still relying on a third party plugin for this, which costs $79/yr.

Not worth it for me in this particular use case, but thanks for sharing.

Hopefully Cwicly can build this right into the query editor some day. this would be huge!