Barn2.co.uk WooCommerce Product Table Plugin Only Sorts Alphabetically Not Numerically – Beware

Barn2-WordPress-Plugins-JSnowCreations

For a while now I’ve been using the Tablepress Plugin for WordPress on my other websites to build affiliate product comparison tables. After my sites grew, and products multiplied, it became more tedious to make and keep up with the ever-growing product comparison tables. I decided the best way to go about fixing this issue was to enter affiliate products as actual products and have them put into tables dynamically. My choices for this endeavor were the free WooCommerce plugin, obviously, and the premium plugin WooCommerce Product Table by Barn2 Media.

The WooCommerce Product Table Numeric Column Sorting Problem Arises

After some trial and error I finally got my huge excel list of products finished and imported into WooCommerce as products. I then fired up Barn2 Media’s WooCommerce Product Table plugin and started trying out different tables using the documented shortcodes. Not surprisingly, some of my columns of mostly numerical data were being displayed Alphabetically, like this:

(Just pretend these comma separated lists are vertical columns in a table – for simplicity’s sake 😜)

Unknown, 1, 10, 14, 100, 1000, 2, 20, 28, 200, 2000, 3, 30, 39, 300, 3000

rather than

1, 2, 3, 10, 14, 20, 28, 30, 39, 100, 200, 300, 1000, 2000, 3000, Unknown

Not a problem, since there are a few alphabetic entries in the column the plugin’s auto-sorting is choosing alphabetic instead of numeric – I’ll just use something in the shortcode or plugin’s back-end to manually set certain columns to numeric ordering rather than alphabet ordering, or so I thought. Tablepress has a place to insert commands to the DataTables Javascript such as "columnDefs": [ { "type": "formatted-num", "targets": [ 2, 3 ] } ] to make the third and fourth columns of a table be sorted by the formatted-num option with formatted numbers such as “1,495”, but there are also options like num for using unformatted numbers like “1495”.

Surely a Premium plugin from Barn2 Media will have this feature. Barn2 Media’s WooCommerce Product Table plugin costs $99 a year for one website, $179 a year for 5 websites, and $359 for 20 sites. It’s definitely not on the cheaper side of the scale when it comes to WordPress premium plugins, so surely they use some of that money for plugin development and continually updating with new features and functionality, right?

The WooCommerce Product Table Numeric Column Sorting Problem Worsens

To my horror, the only thing I could find on the Barn2.co.uk website regarding manual sorting of WooCommerce Product Table columns numerically was this page. Barn2 Media’s solution to columns of numerical data not sorting properly is to go back into categories or product attributes and add zeroes to all of the numeric values to fix the problem. That would mean changing

Unknown, 1, 10, 14, 100, 1000, 2, 20, 28, 200, 2000, 3, 30, 39, 300, 3000

to

Unknown, 0001, 0010, 0014, 0100, 1000, 0002, 0020, 0028, 0200, 2000, 0003, 0030, 0039, 0300, 3000

in order to achieve the very ugly result of:

Unknown, 0001, 0002, 0003, 0010, 0014, 0020, 0028, 0030, 0039, 0100, 0200, 0300, 1000, 2000, 3000

Awesome. That sound like it will be fun doing on a thousand products that each each have 5 attributes of pure numerical data not lead with extra zeroes. 😒

You would think such a major drawback like not having the ability to sort columns numerically would be noted on their sales pages rather than being buried in the Barn2 Media knowledgbase/documentation. I have submitted a feature request to have this limitation fixed and hopefully they will take it into consideration to be fixed sooner rather than later. Otherwise, I probably won’t be keeping my hefty subscription to their plugin for another billing period.

Update: Barn2 Media has gotten back to me and informed me that my feature request has only been requested 7 times and therefore it’s pretty far down on the list. They also let me know that the feature request they are currently working on has 27 requests, although they did not tell me what it was. So.. if you use Barn2 Media’s WooCommerce Product Table and would like the ability to manually set certain columns to numeric sorting, put in a feature request and it might get done faster. That’s pretty much all that can be done…

Leave a Reply

Your email address will not be published. Required fields are marked *