13

How do I set "Enabled","None" as default value for "Status","Tax class" fields in admin?

blakcaps
  • 2,647
  • 10
  • 46
  • 71

1 Answers1

16

Here are some examples of what you can do setting defaults half sensibly. I included a few extras to presage your next question:

UPDATE `eav_attribute` SET `default_value` = 'container1' WHERE `eav_attribute`.`attribute_code`='options_container';
UPDATE `eav_attribute` SET `default_value` = '1' WHERE `eav_attribute`.`attribute_code`='is_active';
UPDATE `eav_attribute` SET `default_value` = '1' WHERE `eav_attribute`.`attribute_code`='is_anchor';
UPDATE `eav_attribute` SET `default_value` = '1' WHERE `eav_attribute`.`attribute_code`='status';
UPDATE `eav_attribute` SET `default_value` = '0' WHERE `eav_attribute`.`attribute_code`='weight';
UPDATE `eav_attribute` SET `default_value` = '2' WHERE `eav_attribute`.`attribute_code`='tax_class_id';
insert into core_config_data values ( null, 'default', 0, 'cataloginventory/item_options/is_in_stock', 1 );
insert into core_config_data values ( null, 'default', 0, 'cataloginventory/item_options/qty', 10 );
Theodores
  • 1,209
  • 1
  • 11
  • 15
  • Thanks, real time savers! Could you also explain what container1 (and 2) refers to, please? – ccondrup May 01 '13 at 15:38
  • 2
    That is the page layout - for configurables and whether you want the options to be up top and next to the image - or not. – Theodores May 07 '13 at 08:45
  • This looks like a nice solution to Magento not providing a built in ability to set defaults for these attributes. These DB changes look pretty harmless but has anybody found any adverse effects? – Josh Davenport-Smith Apr 06 '14 at 18:59