WooCommerce pack – Can I add more sort items than the default ?

313 views November 5, 2016 December 14, 2016 admin 1

Yes, from WPSOLR 14.6, you can.

How does it work ?

WooCommerce sort drop-down list contains a few default sort items. But, as you know, WPSOLR is able to sort by virtually any product custom field.

Just select the option “Replace WooCommerce drop-down list content with WPSOLR’s” in your WooCommerce pack, et voilà!

Select the option to replace WooCommerce sort items with WPSOLR's

Select the option to replace WooCommerce sort items with WPSOLR’s

What are the benefits of replacing WooCommerce default sort items ?

You can, with WPSOLR, sort on any product custom field (if it is not a multi-valued field), without sacrificing performance.

For instance:
– Price
– Attributes
– Attribute variations
– Distance (if the Geolocation pack is activated)

How to configure the sort items ?

Simply configure the sort items as usual, in WPSOLR configuration. And give each of them a sortable Solr type (string, or number, or date).

Index the product price, and give it a number/sortabe type

Index the product price, and give it a number/sortabe type

 

Index the product attribute 'color', and give it a string/sortabe type

Index the product attribute ‘color’, and give it a string/sortable type

 

Give labels, eventually string translations in WPML/POLYLANG, to all sort items.

Give labels, eventually string translations in WPML/POLYLANG, to all sort items.

 

Set a default sort

Use WooCommerce settings->products->display menu to set the default sort..

Set a default sort in the WooCommerce admin

Set a default sort in the WooCommerce admin

 

And the final result is ….

WPSOLR sort items now appear in the WooCommerce sort drop-down list!

WPSOLR sort items now appear in the WooCommerce sort drop-down list!

Was this helpful?

Leave A Comment
*
*