8

I want to have default attribute value as None but whenever I create an attribute, it's first option value is set as default. Please check attached image. How I can configure it so that it's default value will be None instead of first entered option.

enter image description here

Whereas in Magento 1, I was not forced to have a default option selected as depicted in the picture below.

enter image description here

6 Answers 6

3

you can add empty additional option, put that as default. after that you can delete that option.

1

Use browser console and remove checked property and/or as @vijay suggests, add a new, additional empty option and remove it

1
  • This does work, but every time a new attribute is added, the process must be repeated.
    – dawhoo
    Commented Oct 25, 2018 at 17:27
0

You can't do it in base Magento installation.

3
  • There must be a solution to it otherwise we must assign a value to this attribute for all products if this attribute is assigned to attribute set using which we will create a new product. In this case it looks like a bug to me.
    – amitshree
    Commented Feb 24, 2016 at 12:09
  • Default value used only when user edit product. If you add attribute or change default value this do not apply to existing products
    – KAndy
    Commented Feb 24, 2016 at 16:02
  • Sorry I'm missing something here. It's not an required attribute. It should not force me to have a default selected option. In Magento 1 I was not forced to have a default option selected. Please check updated question.
    – amitshree
    Commented Feb 24, 2016 at 16:28
0

Just in case this helps anyone - add a new attribute value, select it as default then delete it. None will then be selected and it will function as normal

0

I tried to unset the option via browser console and save it which did not work. Adding an empty value as default option is also no solution in my case. But if you have access to the database you can unset the default value there:

UPDATE eav_attribute SET default_value = NULL WHERE attribute_code = 'your_attribute_code'
-1

Make the first option 'None'. Despite setting 'Required' to 'No', it's still a generated drop-down, and therefore requires it's own value for 'None'.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.