Magento2 Use Default Value Setting – Where to Check

magento2multi-websitemultistoreproduct

We have a Multiple website Magento 2 setup, We add product data in All store view and only change product price in individual store views.

Now the problem is when we switch to store view, we have to check the Use Default value checkbox for all attributes. we want this check box to be checked by default. check attached image.

Product page image on admin panal

Best Answer

If you want all products have checked Use Default value then run below sql in database:

DELETE FROM `catalog_product_entity_text` where store_id = 1;
DELETE FROM `catalog_product_entity_datetime` where store_id = 1;
DELETE FROM `catalog_product_entity_decimal` where store_id = 1;
DELETE FROM `catalog_product_entity_int` where store_id = 1;
DELETE FROM `catalog_product_entity_varchar` where store_id = 1;

In example code store ID 1 is ID of store. You need to check ID's of all store-views in admin and run the above code for each store-views.

PS: Make sure you take backup of database before sql query.

Related Topic