Question

I still want to be able to access to some products through the URL but exclude them from the Search bar

I am using elasticsearch7

Thank you in advance

EDIT:

Ideally, to do it programmatically

Was it helpful?

Solution

In admin product page, set the visibility attribute value to 'Catalog'.

-> You product will be accessible through category pages and direct url but not through search.

Other values of visibility attribute :

  • Not Visible Individually : Only accessible through direct url
  • Search : Only accessible through search and direct url
  • Catalog, Search : Accessible through all ways

OTHER TIPS

you can set product to not include by setting up individual product visibility option.

refer below screenshot

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top