• Resolved rudolfl

    (@rudolfl)


    Hi all,

    I tried to create a page with products on sale and put in following shortcode
    [sale_products per_page=”32” paginate=”true” columns=”4” orderby=”random”]

    That worked, except none of the filter functionality works now.
    I am using third-party WOOF filter and that does not work on the resulting page.

    OK, I tried to install native Price Filtering widget and that doe snot work either. in fact, it doe snot even appear on the page.

    Here is page in question:
    https://www.fascinators.com.au/wordpress/specials/
    Native widget is installed, should be showing at the top of sidebar, but it does not. Presumably because it thinks there is no data to filter.

    Here is a category page where all filtering works just fine
    https://www.fascinators.com.au/wordpress/category/spring-racing-fascinators/

    Thanks,
    Rudolf

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Ross V. a11n

    (@rossviviano)

    Automattic Happiness Engineer

    Hi @rudolfl,

    Out of the box, product filter widgets do not appear in pages created by the use of product shortcodes – as you correctly mentioned.

    You’d need to use either a plugin or custom coding to get around that.

    Doing a quick internet search, I found this third party plugin that promises to do just that: enable product filters in product shortcodes.

    Note that this plugin is not developed by the WooCommerce team, nor have I tested it myself to see if it works – but I thought you might be interested in giving that a try.

    Hopefully, that helps!

    Thread Starter rudolfl

    (@rudolfl)

    Hi @rossviviano

    May be I did not make myself clear.

    https://www.fascinators.com.au/wordpress/specials/
    Native widget IS INSTALLED, should be showing at the top of sidebar, but it does not. Presumably because it thinks there is no data to filter. Exactly same setup works just fine on any category page. Third-party plugin is there to just verify there is an issue!

    There is something wrong with the way [sale_products ….] works.

    Please do simple test on your site — install native price filtering widget and load it on the page that is created with shortcode in question — you will see the problem.

    Rudolf

    Hey @rudolfl,

    The filter widgets will only be displayed in spots where they can be applied. They work by adding a bit of information to the URL. That causes WooCommerce to grab a new list of products that matches the set filter. Here’s a screenshot to show what I mean.

    filter

    The shortcodes don’t look at the URL of the page when pulling the list of products. Because of that, these filters won’t work.

    Ross mentioned a possible workaround for you. If you do need filters to work with a shortcode, I would take a look at that. This is outside of the default functionality of WooCommerce.

    Take care

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[sale_products] shortcode has a problem?’ is closed to new replies.