cancel
Showing results for 
Search instead for 
Did you mean: 

Don't Show Out of Stock Related Products

Don't Show Out of Stock Related Products

Hi there,

 

Not sure if this has been asked before (I did try searching but couldn't spot an answer).

We have a basic related products rule setup on our site, it shows 5 products in the same category as the product you've clicked on.

 

Was just wondering if there is any way to filter this to not show out of stock products? (I've seen some instances of it showing all out of stock items which isn't the best Smiley LOL)

Ideally it would be something I could sort out Admin side, so I didn't have to bother our developers. But if not then that's easy enough for me to do!

 

Thanks!

3 REPLIES 3

Re: Don't Show Out of Stock Related Products

Go to admin > Stores > configuration > Catalog > Inventory > Stock Options

Set Display Out of Stock Products to NO

If you get the solution then please, "Kudos" and "Accept as Solution" for Token of Appreciation.

Re: Don't Show Out of Stock Related Products

Hey There,

 

Thanks for getting back to me, really appreciate it. Unfortunately this doesn't do entirely what I need, while it does hide the Out of Stock products from the Related Products on product pages but it also hides them sitewide. Ideally i'd like to keep them visible in general since we have a "Receive Stock Notification" option for customers on products to alert people when they're back in stock. I know the product URLs are still live but we still need to see the products.

 

Again appreciate the feedback though!

 

 

Re: Don't Show Out of Stock Related Products

Ok, in that case, you can set No Backorders for respective product-wise, this will involve manual efforts, maybe this is not what you're looking for.

 

Via custom modification for Related Products, you can achieve this, like just modify logic of Related Products and for rest of pages it shows as per setting.

If you get the solution then please, "Kudos" and "Accept as Solution" for Token of Appreciation.