I am trying to:
Order the WooCommerce Products Archive by menu order with title as a secondary sort
Link to a page where the issue can be seen: hidden link
I expected to see:
Products ordered by the menu order I set for them and when they have the same menu order value, sorted by title.
Instead, I got:
The same order no matter what settings I choose. I've tried clearing and disabling server-side caching. I've tried disabling GeneratePress Premium's WooCommerce module. I tried adding a Toolset custom field to Products and using that to sort. It always presents the products in an order that is not by menu order nor product title. If I set the Toolset Products Archive to sort by title with no secondary sort, that does work. I am baffled as to what might be wrong. I also made a copy of the site and moved it to its eventual live hosting account. All the same problems occur there.
There are no javascript console errors not that I would expect this to be a client side issue.
Is this a known issue?
Note that I am not using Blocks for the Archive Output but I don't think that would matter anyway.
It appears to be the same issue under the hood as another issue we have reported, where ordering fails when sorting by a custom field and including a secondary sort order. (This is slightly different, inasmuch as menu_order is a standard field, not custom field.)
I'm going to update the internal ticket we have about this with these details and create an erratum for it.
One thing I did notice, however, is that if I remove secondary sorting and only sort by menu_order, seemingly by coincidence it was secondary sorting by post title, which is what you are aiming for anyway.
Hi Nigel, nice to hear from you. Yes, the workaround of only setting primary sort on Menu Order with no secondary sort is working with Menu Order and the fallback of alpha by title.
It seems the issue may be related to how WooCommerce implements its override on Product Sort (Appearance -> Customize -> WooCommerce -> Product Catalog -> Default product sorting). I suspect that is fighting with Toolset's sorting settings in the Archive in some way and when we choose only Menu Order, WooCommerce is doing the rest.
We can proceed to launch the site with this workaround. It will be good is development can figure this out so we have more sort options in the future but the issue is now a low priority for us.