2

Working on a pretty complex multi-store setup now, and I'm trying to find a way to set all fields as being checked to "Use Default" by default so that a product name change (or etc) wouldn't have to be done at every scope level.

Is there a way to set this up so that everything inherits by default, or a good (and safe) automated way to go through and set this for each field?

Edit: for specificity's sake, let's hone in on one field: "Category Name". How can I set this field to "Use Default Value" on every category, for every store view?

3 Answers 3

1

I faced same problem and I did this

  1. First I find eav_entity_type for catalog_catagory

SELECT * FROM eav_entity_type

enter image description here

  1. I search attribute Id by attribute code url_key

SELECT * FROM eav_attribute WHERE entity_type_id = 3 AND attribute_code = 'url_key';

enter image description here

  1. I search catalog_eav_attribute by attribute id 119

SELECT * FROM catalog_eav_attribute WHERE catalog_eav_attribute.attribute_id = 119;

enter image description here

  1. Update catalog_eav_attribute is_global value 0 to 1

UPDATE catalog_eav_attribute SET is_global = '1' WHERE catalog_eav_attribute.attribute_id = 119;

enter image description here

Finally output will be like this.

enter image description here

Please run all this commands if changes is not showing your admin page.

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

php bin/magento indexer:reindex

php bin/magento cache:flush

php bin/magento cache:clean

Note :- This method will set the value of the url to be the same in all store views forever.

please click on this link its enter link description here

0

This answer applied to my question as well:

https://magento.stackexchange.com/a/194328/60595

All store views had the same copy of category name (from a migration), rather than it being inherited from the default view. So I just needed to delete this data.

0

Set to check Use default Value for Product in magento 2.

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;

Set to check Use default Value for Category in magento 2.

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;

Note : In above SQl query store_id 1 is ID of store. kindly you need to check store Id for all store-views in admin and run the above code for each store-views saperately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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