Hi,
When I create a new product the 'Use default value' for the following options is ticked in both store views.
Short description
Meta Title
Meta Keywords
Meta Description
However existing products do not have this option ticked so I have to change the store view each time I edit a product.
Is there any way I can bulk edit all the existing products so that default value is ticked for the above options?
Thanks for any help!
Hi @idrees_shafique ,
You can change the attribute scope to global for the below attributes. With this, they will always use the default value and there is no setting for setting the value of these attributes on the store view level.
In admin > Stores > Attributes > Product > Search for Short Description attribute and set the Attribute scope as Global
Try to do the reindex after the changes and flush the cache.
Thanks!
Problem solved? Click Accept as Solution!
Hi @idrees_shafique
For Future you can set Global as @Nishu Jindal mentioned.
To update existing products, you can use below method.
You can do it using two ways:
Option 1. From Database
catalog_product_entity_varchar for product name
catalog_product_entity_text for description
You need to delete the entries from the catalog_product_entity_varchar table for the particular store for which you want to use default values from default store.
You can use the following query. In which you need to change your store_id for which you want to delete.
for short description
DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` !=0 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'short_description' and entity_type_id =4);
`store_id` = 0 is the default store id.
Yes, you can do same for rest attribute as well. You can found attribute_code in eav_attribute table.
for Meta Title
DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` !=0 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'meta_title' and entity_type_id =4);
for Meta Keyword
DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` !=0 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'meta_keywords' and entity_type_id =4);
For Meta Description
DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` !=0 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'meta_description' and entity_type_id =4);
Note: Take a db table backup before delete. Try once for a single product. Change the Store id from above query for which you want to delete.
Ref: https://community.magento.com/t5/Magento-2-x-Technical-Issues/Set-all-urlkey-to-check-quot-Use-Defau...
Option2:
Maybe you can follow this steps:
I've made a simple test with one product and the result was as you expect.
Ref: https://community.magento.com/t5/Magento-2-x-Technical-Issues/Use-default-value-product-name-value/m...
I hope it will help you!
How do i do this for customizable options?
I have edited 50+ products in the default view (All Store Views). I checked the store view on these products and they all have Use Default Value not checked. How can i check Use Default Value for all these options and products at once? The whole store view can have Use Default Value checked if that is necessary.
Thanks in advance!