Set Default Values for Status,Tax Class in Magento
Asked Answered
S

1

13

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

Sheepshank answered 29/8, 2012 at 7:47 Comment(1)
May I know why question is down voted?Sheepshank
M
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 );
Misvalue answered 29/8, 2012 at 10:0 Comment(3)
Thanks, real time savers! Could you also explain what container1 (and 2) refers to, please?Judaize
That is the page layout - for configurables and whether you want the options to be up top and next to the image - or not.Misvalue
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?Manns

© 2022 - 2024 — McMap. All rights reserved.