Product Filter – Sale

Legacy Widget

↑ Back to top
As of WordPress 5.8, the Block Widgets Editor replaces the previous widgets administration. The widget described here is available as a Legacy Widget when using the new Block Widgets Editor. However, to maintain full widget settings functionality, you must install the Classic Widgets plugin which restores the previous (“classic”) WordPress widgets settings screens.
This page describes a Legacy Widget. With the Block Widgets Editor, we recommend to use the corresponding Product Filter – Sale block instead. See the Blocks page for an overview of all available blocks with the extension.
The WooCommerce Product Search extension features a great way for customers to find products which are on sale. Its Product Filter – Sale widget provides a live product filter, which allows to restrict the products that are displayed to those which are on sale. The Product Filter – Sale entry under Appearance > Widgets. For this purpose, the filter displays a convenient option which visitors can simply click and then the shop page is updated to include only those products which are currently on sale. This also works in combination with any of the other live filters that come with the extension. Highlighting the Product Filter – Sale widget showing products on sale in the shop

Settings

↑ Back to top
The widget can be used in your theme’s sidebars, to provide a convenient way of finding products that are on sale to your customers. By default, the widget will render if there are any products on sale. It will offer a checkbox and a link that customers can use to filter the products on the current page to include only products that are on sale. The filter for products on sale works with combinations of any of the other live filters that the extension provides, so that customers can find interesting deals for products that they are looking for.

Heading

↑ Back to top
  • Show heading – This option will display the heading.
  • Heading – You can use a customized heading or leave it empty to use the default. The heading is displayed if there are eligible products on sale.

Display

↑ Back to top
  • Show on shop pages only – Use this option to display the widget on relevant shop pages only. That includes the shop page, product tag and product category pages etc. This is enabled by default.
  • Show only if any products are on sale – This option is enabled by default.
  • Submit button – Whether to show a submit button. This is disabled by default. It can make sense to enable the submit button when you choose to disable live filtering.
  • Submit button label – Here you can input a customized label shown on the submit button.
  • Filter – Whether to use live filtering. With this option enabled, clicking the checkbox or the link will take immediate effect and update the products displayed on the page without the need to reload it. With the option disabled, the visitor would have to either click the link or click the checkbox and hit the submit button. This option is enabled by default.

Advanced

↑ Back to top
  • Heading ID – The ID used for the HTML element of the heading.
  • Heading Class – The class used for the HTML element of the heading.
  • Heading Element – The HTML heading element.

Linking directly to Products on Sale

↑ Back to top
This filter provides a great way to create links to products on sale based on any URL that points to a shop page. To achieve this, you would simply append [1] ixwpse=1 and on_sale=1 to the desired URL. For example, if your shop’s URL is at …

https://www.example.com/shop/

… the corresponding URL would be:

https://www.example.com/shop/?ixwpse=1&on_sale=1

You can then simply create a link in the appropriate place like in your site’s primary menu for customers to find it easily. To see this in action, you can try out the link to the demo store’s shop with products on sale. This also works for product categories by appending the same parameters to a product category’s URL, try out for example this link to Women’s shorts on sale on the demo. To create a custom link in your menu for products on sale in your shop, go to Appearance > Menus and under Add menu items > Custom Links create an entry to your shop’s URL with the parameters mentioned above added: Shows an custom link about to be created that points to products on sale in the shop Once the link has been added to the menu, your customers have a convenient way to get directly to the current deals in your shop: Show products on sale in the shop obtained via a custom link in the menu You can still allow your customers to switch back to include any products, i.e. also those that are not on sale, just make sure that you have added the Product Filter – Sale widget to your shop’s sidebar, or alternatively, you can add it with the [woocommerce_product_filter_sale] shortcode so that they are offered the choice.

Notes

↑ Back to top
[1] When you append the parameters, please make sure that you observe the correct form of a URL and produce valid links. The parameters that you add are part of the query string of the URL. As such, you must append each name and value pair by an ampersand &. The query string of the URL must always be preceded by a question mark ? and the query string must come before the fragment identifier # if used. As an example, take the following existing URL to which we will append our parameters correctly:

http://www.example.com/shop/?orderby=price-desc#highlight

The correct form of adding our parameters to this URL would look like this:

http://www.example.com/shop/?orderby=price-desc&ixwpse=1&on_sale=1#highlight

As you can see, we have appended our parameters with appropriate separators after the existing URL parameter in the query string and before the fragment identifier of the URL.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.