Support » Plugin: WooCommerce » Woocommerce price filter doesn’t work with default variation price

  • Resolved faliqzul

    (@faliqzul)


    Hi,

    I have a problem with price filtering on variation products. When filtering price for variation it is actually taking into account all the price within that variation for filtering instead of the default variation price.

    While I do understand that is the behavior for variation products, when I tested them in WC own demo here:
    https://themes.woocommerce.com/storefront/product-category/electronics/mp3-players/
    then, filter by Price: 40-80
    You can see that 2 products: Small MP3 Player and Standard MP3 Player is actually being filtered despite having their variation price range within the price filter.
    Based on this I am assuming that is it filtering based on default variation price.

    I wanted the exact same filtering as the demo. Somehow its not working like that on my end.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would like to add, the reason why I am doing the above is that while my products are using variations, however on the Shop page I would prefer to display a single price on each products instead of price range.

    The problem is while my products would be showing the default variation price (single price) on the Shop page, however when filtering for pricing, its actually taking all the prices in variations, instead of just default variation. This will confuse ppl who view my products.

    I would need some help in changing the logic for price filter to ONLY filter based on default variation instead of all variations price, similar to how price filter works for simple product.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for the examples and background!

    When filtering price for variation it is actually taking into account all the price within that variation for filtering instead of the default variation price.

    That’s correct, and how WooCommerce handles it by default. So in the demo, with the filter set to 40-80, the MP3 player with the range of £34.99 – £59.99 shows up because some of the price is within that range.

    while my products are using variations, however on the Shop page I would prefer to display a single price on each products instead of price range.

    I can understand that that confuses customers – that’s why WooCommerce core shows a range rather than just a single price. If you wanted to change this, you’d need to modify the logic within the Price Filter widget.

    Hi Hannah,

    Sorry for the delay. I’ve decided to actually subscribed to the Measurement Price plugin to get what I wanted, which seems to be overkill as I just wanted to sell things in units.

    By using the above plugin, my products would be the type Simple product and that doesnt requires me to modified stuff on the core packages.

    I would like to point out though again, if you could verify on the demo page below:
    https://themes.woocommerce.com/storefront/product-category/electronics/mp3-players/
    I would like you to focus on these 2 products: Small MP3 Player 34.99-59.99 and Standard MP3 Player 29.95-59.95.
    Now, try to Filter price 40-80.
    You will notice the result despite these 2 products above have variations in ranges of the filtered price, it is actually being filtered out. This kinds of confuses me on the default behaviour for filtering.

    WooCommerce handles it by default. So in the demo, with the filter set to 40-80, the MP3 player with the range of £34.99 – £59.99 shows up because some of the price is within that range.

    Mikey Arce

    (@mikeyarce)

    Automattic Happiness Engineer

    Hi @faliqzul,

    Our Demos are not currently up to date with the latest versions of WooCommerce, sorry for that!

    If you look at my test running WooCommerce 3.4 you will see this:
    http://cld.wthms.co/qaUVAO

    As long as there is a variation in the range it will show up.

    Hope this helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce price filter doesn’t work with default variation price’ is closed to new replies.