• Resolved patbatista

    (@patbatista)


    Hi,

    I want to sort my products from most stocked to least stocked – out of stock.

    In the customize menu – woocommerce – product catalog – I selected – sort by stock quantity: high to low.

    However, two problems arise:

    • On the store page there are products with more stock that appear later, or even sold out before those in stock.
    • On a custom page with the Elementor, using the woocommerce – products element doesn’t work either.

    I’ve tried with several codes, and I can’t get it to work.

    Is there any way to solve it, or even a plugin?

    Thank you so much

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @patbatista,

    Thank you for reaching out!

    On the store page there are products with more stock that appear later, or even sold out before those in stock.

    Did you check if these “products” have custom menu order values? :?)


    Link to image: https://d.pr/i/kVB28o

    The lower the value, the higher the product will rank in the catalogue. Therefore, if all products have a default value of 0, assigning a value of -1 will place it higher in the catalogue.

    Look forward to hearing back from you.

    Thread Starter patbatista

    (@patbatista)

    Thank you for your help. I’ve tried but it still doesn’t work.

    Also, I wanted something “automatic”, which changes the order of the products depending on whether they are in stock or backorder and out of stock.
    That I didn’t have to do it daily and manually.

    Once again, thanks for the help.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @patbatista

    By default, WooCommerce core doesn’t support sorting products by stock status out of the box.

    However, there are a few solutions that may help you achieve this:

    1. Custom Code: You can use custom code to modify the product query to sort products by stock status. This would require some knowledge of PHP and WordPress hooks. If you’re not comfortable with coding, I’d recommend hiring a developer.
    2. Plugin: There are several plugins available that could help you with this. One such plugin is WooCommerce Extra Product Sorting Options. This plugin adds more sorting options, including sorting by stock status.

    I hope this information helps. If you need further assistance, feel free to ask.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sort woocommerce products’ is closed to new replies.