Magento 2 Display Product Based on Store View

in Magento 2, products are always based on the website, not on the store. We can update product attribute values at the store level but the products itself is global for all the stores. You may have business requirements like hiding and showing products for a specific store. This blog post by Dhairvi Solutions show you how to display product on the store level. Before we go ahead if you are unaware of how Magento Product Scope works then you should review it over Magento doc.

As you know that we can set product attributes value on the store level, so maybe you are now thinking about disabling the product for the specific store from the Magento admin and when you are trying to update product status on the store level you’ll realize that enable or disable products for a specific store in Magento is not possible, because product status attribute can be set either on a global level or website level but there is no option to set it on a store level. So the question is, how we can hide product for specific store in Magento 2? So the answer is, use the product Visibility attribute for that.

How to Hide Products for Specific Stores in Magento 2

Step 1: Open product from the Magento 2 admin.

Step 2: Select the store from the scope dropdown for which you want to hide the product.

Step 3: Set “Not Visible Individually” for “Visibility” attribute and save the product.

Magento 2 product scope

After you did above change, this product will stop displaying in that specific store view, in our case FR store.

Review our previous blog post to know how to install sample data using composer command in Magento 2