uc_attributes confusion

Posts: 63
Joined: 01/23/2008
Bug Finder

Hi

I am a little confused with the "required" and "predefined" configurations of uc_attibute module.

If I check an attribute as required for a product, the combo fills up with a "Please select" and no predefined option is selected by default.

Then, If I don't check the attribute as required, the "please select" goes away and the predefined get selected by default (expected behaviour, i think), but there is not empty option, so the attribute is mandatory too!

Could anybody explain me the sense of the "required" option of the attribute module? I think it is confusing me.

Thanks

Posts: 2102
Joined: 08/07/2007
AdministratoreLiTe!

This has come up enough that I've made a FAQ page for it: http://www.ubercart.org/faq/5421. Hope that clears things up.

Posts: 63
Joined: 01/23/2008
Bug Finder

Thanks for the answer Lyle.

But the point is that, in the options of the attribute there are radio buttons that force you to select one of the attributes as predefined, so the result is that the attribute is always mandatory.

If you mark it as required is mandatory because the drupal api form forces you to select one (and then the predefined radio buttons are not used)
If you dont mark it as required, is mandatory too, because one of the attributes is selected by default and you cannot left it blank.