Allowing Import Of Invisible Attributes

Posted Almost 12 years ago. Visible to the public.

By setting a Product Attribute to be invisible via the visible property, you stop the ability to import that attribute unless you alter the _forcedAttributesCodes property of the relevant product type. The class names are:

  • Mage_ImportExport_Model_Import_Entity_Product_Type_Simple
  • Mage_ImportExport_Model_Import_Entity_Product_Type_Grouped
  • Mage_ImportExport_Model_Import_Entity_Product_Type_Configurable

The best method is probably to subclass the relevant product import class, then overwrite the property. It would be far better to use the constructor to append to the property rather than just overwrite it to make future upgrades as smooth as possible, but Magento, in all their wisdom, have marked the constructor as final so you cannot do this, and we have no events to take advantage of.

Mike Whitby
Last edit
Over 10 years ago
Posted by Mike Whitby to Magento (2012-07-12 10:09)