Closed (fixed)
Project:
Dropdown Attributes
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2012 at 17:36 UTC
Updated:
22 Nov 2012 at 02:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
abluem97 commentedI should also note that it does not let me add the product to my shopping cart because of this error.
I also tried reverting to 1.8 and 1.9 but ran into entirely different issues there. The dev version seems so close to working...
Comment #2
benitezv1ang commentedsame massage with me.
An illegal choice has been detected. Please contact the site administrator.
This only happens when required attributes are unchecked in both attributes (tab) and Dependencies (tab).
I tested with text box and works fine.
This happens with select box only (selection box)
see attached files for reference
Comment #3
trobey commentedI should be able to fix this error. However, I think there is a problem with how you are using this module. I have not found any case where a dependent attribute should not be required. This is not obvious and I keep having to explain this to users. If you have a dependent attribute it may never be displayed to the user. An attribute that is not required has a default option. When the product is added to the cart the default option will appear for an attribute which may never have been displayed to the user. This is going to lead to customers getting very confused and is bad UI. By checking the required box a "Please select" option is added (for select boxes). Then if a dependent attribute is not displayed to the user it will also not show up in the cart.
There also is a difference between checking the required attribute checkbox on the two screens. A dependent attribute cannot have the required checkbox checked on the Attribute tab. This is because the attribute may never be displayed to the user and in that case will fail validation. The required checkbox on the Dependencies tab only requires the attribute if it is displayed. When the Dependencies tab form is saved it checks and unsets the checkbox on the Attributes tab to avoid validation errors. But a determined user can probably check the required checkbox on the Attributes tab and cause validation errors.
Comment #4
trobey commentedI should be able to fix this error. However, I think there is a problem with how you are using this module. I have not found any case where a dependent attribute should not be required. This is not obvious and I keep having to explain this to users. If you have a dependent attribute it may never be displayed to the user. An attribute that is not required has a default option. When the product is added to the cart the default option will appear for an attribute which may never have been displayed to the user. This is going to lead to customers getting very confused and is bad UI. By checking the required box a "Please select" option is added (for select boxes). Then if a dependent attribute is not displayed to the user it will also not show up in the cart.
There also is a difference between checking the required attribute checkbox on the two screens. A dependent attribute cannot have the required checkbox checked on the Attribute tab. This is because the attribute may never be displayed to the user and in that case will fail validation. The required checkbox on the Dependencies tab only requires the attribute if it is displayed. When the Dependencies tab form is saved it checks and unsets the checkbox on the Attributes tab to avoid validation errors. But a determined user can probably check the required checkbox on the Attributes tab and cause validation errors.
Comment #5
abluem97 commentedThanks for the response trobey. I have tried messing around with the dependencies quite a bit but keep getting the same result, any time I make any selection at all I get the same error message...
The first attribute I had selected to be required. Although I just noticed that after I check it "required" and reload the page it is unchecked again. I'm not sure if that is a problem with the module, or something is wrong at my end...
It's so close to working though. I would be really appreciative if you can help me find a solution.
Comment #6
abluem97 commentedIt looks like I have the module working the way I want it to. I made all the attributes required, which I thought would cause problems since the user won't be selecting an option from each list, but it seems to work anyways...
Thanks for the help!
Comment #7
abluem97 commentedComment #8
benitezv1ang commentedSometimes is useful to land on default option
instead of please select
thanks trobey for this module is great.
Comment #9
trobey commentedAlthough I do not have a use case for not enabling the required attribute in the Dependencies tab for dependent attributes there still may be other people that need this. So this bug is still valid and I have just checked in a fix to the dev branch that avoids the illegal choice message. Some testing of the change would be useful.
There still remains issue #1835010: Dependent Attributes options which is a feature request to make not enabling dependent attributes as more usable.
Comment #10
benitezv1ang commentedThanks for the update
Comment #11
trobey commented