Group Sorting:
- There is a text field in the theme settings where you list the tag prefixes with no underscores. (ex: Size,Price,Color)
- All groups must be mentioned in that input field in order to appear, if no groups are mentioned then it will go in alphabetical order.
Individual List Sorting:
- This requires the use of a Link List in the Navigation area of the Admin
- The list name is 'reorder_' with the tag prefix to represent the group of tags you want to manually sort. ie Reorder_Size
- Each link inside this list is the full product tag with prefix and underscore directly the same as in the product page.
- Only the lists that you want to sort manually need to be created or else it will just use the normal sorting of the list
- See image below as an example:
Here is a workaround I created to allow you to reorder the sidebar categories. For some reason the array with group_array was not getting the appropriate category headings to compare to the category names. So, that's why this code above was no longer working.
My workaround only allows you to reorder the sidebar categories. It does not reorder the tag lists within the sidebar categories.
I am not a full time coder, just code here and there on the side with no formal training, so this may have some glitches. For instance, it seems to fail with tags having spaces and quotes in them, evidently (I had to change sizes to 1-1/2" from 1 1/2" for example). But, in general it works.
What I did was created a new linklist. Just go to navigation and create a new menu and put in your desired tag groups. (Brand, Size, etc.). Put the link for the new menut item (ie, "Brand") to homepage (it doesn't matter). You have to name these menu items the exact same as your tag categories or it won't work. You must name this new menu "SidebarNav". That is what the code will search for and parse through. The category you want first on the sidebar should be first and go on top when creating the new menu.
What happens is the code takes these menu items and creates a new loop. It says take menu item 1, and then when the old code category matches to that menu item, it executes the old code. It then goes on to menu item 2, etc. It only puts in the category when it matches to the new menu in the order of the new SidebarNav menu.
You do not need to modify your schema or settings file.
So, here is the entirety of the new collection-sidebar.liquid snippet