1

We have disabled out-of-stock products from showing on the frontend, but would like to override this for search results only.

How would we accomplish this?

Note: this store has thousands of products that go in and out of stock regularly. We need them to reappear in the catalog when they're back in stock, but always be visible in the search results.

1
  • I am also looking for something like this. Have you got any solution?
    – Pribhav
    Mar 9 '19 at 10:08
0

Enabled the products and changed their visibility to Search.
Next Set Display Out of Stock Products to yes under Store -> Configuration -> Catalog -> Inventory -> Stock Options.

Update

The product will not appear in the catalog because the visibility is set to Search. To make a product visible in the catalog visibility should be either Catalog or Catalog/Search.

To change the visibility of multiple products together, you can use the Magento Import functionality.

4
  • Wouldn't this keep the products from being visible in the catalog once they're back in-stock? And we're dealing with thousands of products, for the record.
    – brackfost
    Oct 17 '18 at 13:46
  • @BrockfastCowboy No, the product will not appear in the catalog because the visibility is set to Search. To make a product visible in the catalog visibility should be either Catalog or Catalog/Search. Oct 18 '18 at 4:27
  • @BrockfastCowboy To change the visibility of multiple products together, you can use the Magento import functionality. Oct 18 '18 at 4:28
  • That's not what we're trying to do. Changing the visibility won't work.
    – brackfost
    Oct 18 '18 at 12:53
0

@BrockfastCowboy, Unfortunately the only way to do this is manually. I use the mass update attributes in the product grid to change visibility in mass. I filter the product grid by selecting Availability: "Out of Stock"

I then, check all the products in the search results and update the attributes in mass. There I change the visibility of those products to "Search" only.

I wish there was an automatic function that would change the Visibility based on the product Availability. If anyone finds such a solution please let us know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.