When using variable products WooCommerce by default shows a price range on the archive and product pages. If your store sells products that can vary in price a lot having a big pice range can deter users from even looking at products while they may still be interested in them.

Take for example a wine store where single bottles or wine are sold, this includes product variations that represents a box or case of 6 and 12 bottles. A customer shopping for a single bottle of wine may get deterred from a product seeing a price range like this;

Showing a 'From: $9.99' Price

A solution for this could be showing a "From: $9.99" price instead of the full price range. This makes it clear there are other prices, but doesn't scare anyone off immediately without knowing the exact details.

The desired result of 'starting from' price can be accomplished using a simple code snippet.

The snippet above will change the product price output for variable products only. It also won't change when all variations of the product have the same price, in that instance it will simply display the single price without the 'From:' prefix.

The result for the code snippet should look something like this.

That will look a lot more appealing to customers when browsing on your site.

Showing the Full Price Range on the Details Page

With the code snippet above it will also modify the price on the product page to only the "From: $9.99" format.

As the customer is a bit further in showing interest in the product and you do want to provide as much information as possible you may consider to show the native price range in this view. The price of a single bottle is after all shown below the dropdown selection too.

This only requires a small modification in the earlier code snippet to ensure it doesn't apply to the product detail page.

This snippet ensures the overview / shop pages show the 'starting from' prices, and the product detail pages show the native price range.

Thats it for this post! Hopefully you find this a helpful change :-)

Categories: Uncategorized

About the author: Jeroen Sormani is actively building WordPress, WooCommerce and Easy Digital Downloads plugins. Slightly obsessed by writing high quality code.
Follow Jeroen on Twitter

Leave a Reply

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