2

I would like to set 'Name' and 'Description' attribute to Use Default for a couple of store views.

Like I have those store views.

  • Eng CA
  • Eng USA
  • Fra
  • Spa

So I would like to set globally for all products use default for first 2 store views.

I will accept as correct answer a SQL script that set one of the 2 attribute to Use Default for a Store view

3

Attribute are defined in eav_attribute table.

On Magento 1.4 those has these ID:

  • short Description -> 506
  • Description -> 97
  • Name -> 96

Where data are stored:

  • Values for NAME attribute are stored in catalog_product_entity_varchar table.
  • Values for DESCRIPTION attribute are stored in catalog_product_entity_text table.

How it works

  • Magento creates a new row in the above tables for every scope (store) where I have deselect 'use default'
  • Values for General Scope has 0 as store_id

So basically I neet to delete all values for attribute 96 and 97 that are related to the Eng CA and Eng USA storeview from catalog_product_entity_varchar

Suppose those store view has id 1 and 4

SQL

FOR NAME attribute:

SELECT * FROM `catalog_product_entity_varchar` WHERE `attribute_id` = 96 AND (`store_id` = 1 OR `store_id` = 4)

FOR DESCRIPTION attribute:

SELECT * FROM `catalog_product_entity_text` WHERE (`attribute_id` = 97 OR `attribute_id` = 506 ) AND (`store_id` = 1 OR `store_id` = 4)

:) if you want to remove them change 'SELECT *' with 'DELETE'

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.