cancel
Showing results for 
Search instead for 
Did you mean: 

Bulk Edit - Use Default Value for Product Name / Description

SOLVED

Bulk Edit - Use Default Value for Product Name / Description

Hi,

When I create a new product the 'Use default value' option for product title and description is ticked which is fine.

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 title and description?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Bulk Edit - Use Default Value for Product Name / Description

Hi @idrees_shafique 

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. 

DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` = 2 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'name' and entity_type_id =4);

 

Fro description:

DELETE FROM `catalog_product_entity_text` WHERE `store_id` = 2 and attribute_id in(select attribute_id from eav_attribute where attribute_code = '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:

 

  1. Go to System -> Export
  2. Export Products
  3. Edit the file and remove the store view rows you got with the second value
  4. Now you have a file only with default values/names
  5. Import your file

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!

View solution in original post

5 REPLIES 5

Re: Bulk Edit - Use Default Value for Product Name / Description

Hi @idrees_shafique 

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. 

DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` = 2 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'name' and entity_type_id =4);

 

Fro description:

DELETE FROM `catalog_product_entity_text` WHERE `store_id` = 2 and attribute_id in(select attribute_id from eav_attribute where attribute_code = '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:

 

  1. Go to System -> Export
  2. Export Products
  3. Edit the file and remove the store view rows you got with the second value
  4. Now you have a file only with default values/names
  5. Import your file

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!

Re: Bulk Edit - Use Default Value for Product Name / Description

Thank you for your help. I will ask our developer to make the changes.

Re: Bulk Edit - Use Default Value for Product Name / Description

This worked as expected, thank you for your help!

 

Now I realised I also need to do the same for the following:

Short description

Meta Title

Meta Keywords

Meta Description

 

Do you know how I can do this please?

 

Re: Bulk Edit - Use Default Value for Product Name / Description

Hi @idrees_shafique 


Yes, you can do same for rest attribute as well. You can found attribute_code in eav_attribute table.

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);

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); 

 I hope it will help you!

Re: Bulk Edit - Use Default Value for Product Name / Description

Hi, @Vimal Kumar Thank you for this.  Would you know how to set "Use Default Value' for Product 'Visibility' with an SQL query.

Also, I have been having to write my SQL queries like this for them to work 

DELETE FROM `catalog_product_entity_varchar` WHERE `store_id` = 1 and attribute_id in(select attribute_id from eav_attribute where attribute_code = 'meta_title' and entity_id = 10710);


Just curious. Thank you for the help.