Sorting WooCommerce Products

Using the Gutenberg plugin on a blog is one thing: Using it on a WooCommerce site is another. So while I have been using Gutenberg since January 2018, it was only couple of months ago that I activated Gutenberg  on a WooCommerce test site.

I did it when the people at WooCommerce released the WooCommerce Gutenberg Products block plugin.  It was clear how to use Gutenberg to import product images into posts and pages.However, there was no ‘Gutenberg action’ on Product pages.

I thought it might be that the theme I was using was not yet G’berg compatible but it was the same on the 2017 theme, so I switched back.

I asked in the Facebook WooCommerce Help and Share group and was directed to what Mike Jolley said back in May:

Since WooCommerce is not optimised for the Gutenberg editor we’ve decided to keep the old editor for now so sites do not break when WordPress 5.0 is released. Products are not content focussed so using Gutenberg with our meta box placed awkwardly at the bottom is not ideal.

And back in February, Cladiu Lodromanean said:

It’s just temporary until we develop nice Gutenberg-compatible screens for Products/Orders/etc. When Gutenberg is merged into WP core and released we will be ready with the Products block in WooCommerce 3.4 but editing products and orders in Gutenberg will come in a future WooCommerce release.

It won’t be until next year that the people at WooCommerce will be working on using the block editor for products.Meanwhile, even on normal posts and pages, what you still cannot do is order the images with drag and drop. We are restricted to the old ordering system.

If you ask why drag/drop and the ability to move images around is important, look at it from the point of view of the site owner and a customer.

The site owner wants to present the products in the way he/she wants – maybe arranging by colour. And the customer wants to see the most relevant presentation according to the product.

The ‘old’ (current) ordering system allows site owners to list product images by:

  • default sorting (custom ordering + name)
  • Popularity (sales)
  • Average rating
  • Sort by most recent
  • Sort by price (asc)
  • Sort by price (desc)

You can change the order of display under custom ordering by going to WooCommerce > Settings in your WordPress admin. On the Products tab, the Display settings should be set to Default sorting (custom ordering + name). If it is not, then change it to that first.

Then, in the Products admin panel, select Sorting (see the image at the top of this article) and then drag and drop your products in the order that you’d like.

If you have got a lot of products, then it’s not realistic to drag a product up or down hundreds of rows to where you want to place it.

An alternative is to order the products in the Quick Edit menu by changing the order value. The default is zero. Change the numbers and the custom order will display the lower numbers first (negative numbers are allowed).

You can also edit the order value in the Product Data > Advanced tab on the product edit page.

Sounds good, but you have to hold the numbers in your head while you sort them.

There’s a bigger problem though, and that is that custom sorting is applied against all items and not against separate categories, and in all places where the products show.

That may not be what you want. You may want products to show up in a different order in different sections of your site.

For example, you may want to showcase eight products in a blog post and you may want to arrange them in a specific arrangement so that the order complements your text. You can do that, but then that order will apply everywhere the products show.

Only being able to arrange products by date uploaded or the ones with the most sales, etc. is a limitation that doesn’t fit with what store owners want and need. And custom ordering has its own shortcomings.

I asked James Koster of WooCommerce about the capability to drag images around. He replied saying that eventually drag/drop will be a feature, but as it had only recently been added to Gutenberg core,  they are yet to work on their own implementation for the products block. 

Roll on the drag and drop capability. It cannot come soon enough.

No WooCommerce Product Reviews Tab?

No WooCommerce product reviews tab? Maybe this is why.

I decided to activate product reviews on a site running WooCommerce.

I recalled that I had disabled reviews soon after I set up the site. That was on the advice of someone writing about how to reduce load on the server with requests going back and forth. That was on a site getting thousands of hits an hour. Still, I followed the advice.

Now I wanted to bring back product reviews. They would show up in the Reviews tab next to the Description tab on single product pages.

I saw a comment by Mike Jolley of the WooCommerce team, that reviews are a type of comment. Therefore, comments have to be enabled on the site.

I had the Disable Comments plugin activated, so the first thing was to deactivate it. In fact, I no longer need it since Gutenberg. With Gutenberg you can mark any individual post or page ‘Allow Comments’ or not, by checking a box in the post or page sidebar.

Next thing, make sure that comments were set to be moderated before being published.

Now to WooCommerce itself. Go to Settings/Products and Enable product reviews. Check off to show the verified owner label on customer reviews; check off that reviews can only be left by verified owners; and enable star ratings on reviews.

Done.

I still couldn’t see the Reviews tab next to the Description tab in the individual Product pages.

Why was the Review tab not showing on the Product pages?

What was the problem?

I googled. Perhaps there was something left hanging over in the database for the disable comments plugin? Hardly, but you never know.

Perhaps I had added something to a php file to disable comments? Perhaps, perhaps. I FTP’d in and looked in the files. Nothing. 

I watched youtube videos explaining how to enable reviews.

Nothing. No answer. What I did see was that it was a problem that had been asked about time and time again.

And then I spotted something – a graphic showing the product bulk editing screen. Oh yes, I need to ‘enable reviews’ if they are not enabled.

This is a screen grab of the back end of my WooCommerce site. I’ve put a red line around the ‘enable reviews’ box: 

a screen grab of the back end of my WooCommerce site with a red line around the 'enable reviews' box

Were they enabled on my site? No, they were not.

I had disabled them ages ago.

That was the answer. 

I highlighted all the products, checked that box, and bingo. Now the Reviews tab was there, next to the Description tab.

the Reviews tab next to the Description tab in WooCommerce.

Tip: Rather than have to enable each page of products one by one, temporarily change the number of products shown per page to a number greater than all the products you have on the site.

To edit the number of products per page, click on the screen options tab dropdown at the top of the page.

Then you can click to bulk edit all of them in one go.