I'm trying to figure out the best way to provide a mechanism for the site visitor to select the sort order for the product listing.
Currently you can make a default setting in the MP admin screen, which is fine. But I would like the user to have the option of viewing the list in Alpha, date, price low-to-high and price high-to-low.
One idea I had was to use the [mp_list_products] shortcode to set up various pages with the different sort orders. However that shortcode doesn't make use of the mp_productlist.php child template I've already developed to serve the default view. And I don't see how to easily modify the results of the shortcode for a suitable presentation.
It seems like I have to modify the orderby clause in the WP_query on a conditional basis but I'm not sure where in the templates to attempt that and what the code would look like exactly. Any any advice is greatly appreciated.
Also, as a side note, it seems to me that products need an extra alpha sort field to account for cases when the "title" sort needs to eliminate short words like "A" and "The" from the left.
Any help is greatly appreciated. If this has been covered elsewhere in the forums I apologize in advance, but I did numerous searches on "product list order" and variations of that and did not find an answer.