Forums Forums Search & Filter Pro “In Stock” Filter

Tagged: 

Viewing 10 posts - 1 through 10 (of 107 total)
  • Anonymous
    #213637

    Hey Trevor I hope all is well! I am using S&FP strictly for a shop page and was wondering if there’s any way to add a function/option where customers are able to select “show in stock only” so that all items that are out of stock are filtered out…essentially a digital version of looking through a catalog that only shows products that are available.

    Inventory is tracked for every single product and backorders aren’t allowed so I’d imagine this should be relatively simple but I could be wrong, do you have any insight on this?

    Trevor
    #213657

    There would have to be a custom field that holds logical 0/1, true/false, yes/no type of value to show stock status. Stock level would not work.

    Anonymous
    #213661

    Ben, are you using WooCommerce?

    Anonymous
    #213690

    Thanks for the quick response guys!

    Trevor – how could I go about setting that up?

    Jordan – yes I am.

    Trevor
    #213699

    Doesn’t WooCommerce have a custom field (post meta) called stock status?

    Anonymous
    #213708

    Yep.

    The key you’ll want to filter by is: _stock_status

    Anonymous
    #213710

    Actually ignore my post above, that’s not directly connected with the actual number of stock available.

    However that key is: _stock

    So combine them maybe.

    Anonymous
    #213712

    Again just corrected myself, sorry! haha.

    If a status is IN-STOCK then the check if any items are available still has already been done so yeah, _stock_status is correct to use as the filter meta key.

    Anonymous
    #213720

    Thanks for the quick responses guys!

    Jordan how do you recommend setting it up? I did it as a “choice” and the options were either “instock” or “outofstock”. I’d like to have it where it just says “Show in-stock only” and that’s all.

    Trevor
    #213722

    I might set it up as a checkbox, but set the options to manual and just add the one you want and the label you want.

Viewing 10 posts - 1 through 10 (of 107 total)