AvS_FastSimpleImport icon indicating copy to clipboard operation
AvS_FastSimpleImport copied to clipboard

Use Config Settings (Display settings) on Category import

Open r-esch opened this issue 11 years ago • 2 comments

Please implement this Option:

If the option "Use Config Settings (Display settings)" is active, the required fields should be set to default.

'available_sort_by' => 'default',
 'default_sort_by' => 'default',

r-esch avatar Jun 24 '14 15:06 r-esch

@r-esch I've considered this a core bug. The problem is that the fields aren't required in Magento but the attributes are marked as required. This causes problems while importing categories.

The easiest fix is to find the attribute in the eav_attribute table and set the is_required column to 0. This doesn't cause problems in the admin panel but does fix the issue on your installation.

paales avatar Jul 03 '14 12:07 paales

Assuming that $installer is an instance of Mage_Catalog_Model_Resource_Setup, you can use this snippet in an install/upgrade script:

$installer->updateAttribute(Mage_Catalog_Model_Category::ENTITY, 'available_sort_by', 'is_required', false);
$installer->updateAttribute(Mage_Catalog_Model_Category::ENTITY, 'default_sort_by', 'is_required', false);

sprankhub avatar Nov 13 '15 15:11 sprankhub