7

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

  • Did you get the answer for this ? – Jai Sep 21 '17 at 7:47
  • @Jai unfortunately no – Arun Karnawat Sep 21 '17 at 12:43
  • Check answer and it will sort out your issue. – Jai Sep 22 '17 at 12:00
  • I am also facing the same issue cant find the solution 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; this query not solve your issue if you save than agan checkbox uncheked – Test Raindrops Dec 6 '18 at 7:00
  • Rather than copying the answer that didn't work and saying it doesn't get saved you'd be better to ask this as a new question. Just provide a link to this question in your new question and explain why the answer didn't work for you. – PeterJ Dec 6 '18 at 7:31
10

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.

  • 2
    this may not be what I was looking for, but it will do the job. you answer did helped me. – Arun Karnawat Sep 22 '17 at 16:07
  • 1
    Thank you, your solution inspired me to write some queries to sync text info from store view categories to All store category. – Mohammed Joraid Mar 9 '18 at 18:59
  • Good luck .. (y) – Jai Mar 12 '18 at 4:20
0

For categories i ran the following query and it worked.

DELETE FROM `catalog_category_entity_text` where store_id = 1;
DELETE FROM `catalog_category_entity_datetime` where store_id = 1;
DELETE FROM `catalog_category_entity_decimal` where store_id = 1;
DELETE FROM `catalog_category_entity_int` where store_id = 1;
DELETE FROM `catalog_category_entity_varchar` where store_id = 1;
0

You can fix it by overriding method "copyToStores" from class "Magento\Catalog\Controller\Adminhtml\Product\Save"

Method should be look like below

protected function copyToStores($data, $productId) { return; }

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.