realbig / theme_pmwoodwinds

1 stars 0 forks source link

Arrange the display of (only) the accessory product category by name #19

Closed BigActual closed 5 years ago

d4mation commented 5 years ago

This will depend on getting all the Filtering stuff in #9 and #1 finished up.

d4mation commented 5 years ago

I'm having a difficult time determining exactly how the products were sorted before looking at the old code for the Product Archive. Is it some combination of what kind of Instrument/Mouthpiece they are combined with their Brand?

By default WooCommerce sorts by Post Title it seems, and with all the Filtering/Sorting tools at the disposal to the user, I wonder if having a special default ordering like this (Especially if it is not consistent store-wide) may just prove more confusing for the end-user?

BigActual commented 5 years ago

OK, so this one is important to the client. He would like the products to start by displaying used first. Let me look up the order and I'll add another note below for the sort order within each subsection (used, new, all).

BigActual commented 5 years ago

https://wordpress.org/plugins/woocommerce-product-sort-and-display/ is a solution specifically designed to deal with this. @d4mation will install and configure this to see if it alleviates the issues Paul has been experiencing.

d4mation commented 5 years ago

Unfortunately, this plugin does something different than what we're aiming for.

  1. It only works on the main "Shop" page, whereas we're viewing specific Product Categories.
  2. It doesn't sort the Query, but instead lists them as Category "Sections" on the Shop page in whatever order you define. Edit: By "Not sorting the Query", I mean each of these "Sections" is its own Query. They're not doing anything special.
  3. It only works on Top-Level Categories it seems, and our Top-Level Categories are "Instruments", "Accessories", and "Mouthpieces".

image

BigActual commented 5 years ago

Feedback from the client. Product order of horns on the archive is critical. Smallest to largest is the accepted order. This should apply in all, used, and new:

  1. Saxophones:

    1. Sopranino Saxophones
    2. Soprano Saxophones
    3. Alto saxophones
    4. C Melody saxophones
    5. Tenor Saxophones
    6. Baritone saxophones
    7. Bass Saxophones
    8. Electronic Saxophones
  2. Clarinets:

    1. Bb Clarinets
    2. A Clarinets
    3. Eb Clarinets
    4. Alto Clarinets
    5. Bass Clarinets
    6. Contra Alto Clarinets
    7. Contra Bass Clarinets
  3. Flutes:

    1. Piccolos
    2. Flutes
    3. Alto Flutes
    4. Bass Flutes
  4. Oboes

  5. Bassoons

  6. English Horns

BigActual commented 5 years ago

This should likely be closed, right? The latest bit starts to deal with everything else, which is covered in #9 .

d4mation commented 5 years ago

Well, #9 is a different issue. Unless all he wants is for the filters to be in that order? If that's the case, then #9 with the FacetWP implementation did solve this.

d4mation commented 5 years ago

This has been implemented on http://pmwoodwind.wpengine.com/products/instruments/?_show=used

It is Post Meta that will automatically update to the "Highest Indexed" value based on the list above whenever a Product is saved/updated.

d4mation commented 5 years ago

For clarity's sake, it checks for whether a Product has a Product Category matching these exact names (However, capitalization does not matter) and puts them in order from top to bottom. If it has multiple for whatever reason, it will use the one furthest down the list:

Sopranino Saxophones
Soprano Saxophones
Alto Saxophones
C Melody saxophones
Tenor Saxophones
Baritone saxophones
Bass Saxophones
Electronic Saxophones
Bb Clarinets
A Clarinets
Eb Clarinets
Alto Clarinets
Bass Clarinets
Contra Alto Clarinets
Contra Bass Clarinets
Piccolos
Flutes
Alto Flutes
Bass Flutes
Oboes
Bassoons
English Horns

If needed, this ordering/list can be adjusted. It only requires the import script to be re-ran.

d4mation commented 5 years ago

For reference, this is now the default sort order for Mouthpieces:

Brass Mouthpieces
Sopranino Mouthpieces
Soprano Mouthpieces
Hard Rubber Soprano Mouthpieces
Metal Soprano Mouthpieces
Alto Mouthpieces
Metal Alto Mouthpieces
Rubber Alto Mouthpieces
Tenor Mouthpieces
Metal Tenor Mouthpieces
Hard Rubber Tenor Mouthpieces
Baritone Mouthpieces
Metal Baritone Mouthpiece
Hard Rubber Baritone Mouthpieces
Clarinet Mouthpieces
Bass Clarinet Mouthpieces

While the Instrument-type order is the same, the Category names are very different so it needed its own defined order.