Well...here is a small diff that adds required attributes.
First off, update.php will need run since the install file adds a new field, 'required', to the uc_product_attributes table.
The changes will add a 'Required' checkbox on an individual product's attribute settings page. I decided to make this product specific, although a checkbox could be added to the general Attribute settings page and the product could inherit that by default in the same way that Attribute prices/costs/etc. work.
A product's attribute with options still requires a default option even if the attribute is required, but on the attribute settings page the Default Option will show as n/a, the same as it does for an attribute with no options. (this could be changed to ignored, ignored when required, or anything like that).
On the cart page, required attributes will be set to '#required' => true and in the case of attributes with options, a select box will show with a default first option as 'Please select an option'
The patch also does whitespace trimming that Komodo does automatically which explains a large part of the diff file. It should apply fine to the latest Bazaar code.
If anyone wants to test that out I think it might be a decent start towards having Required Attributes. Lyle, I guess that is directed mostly at you to see if you want to consider adding this sort of functionality to core.
| Attachment | Size |
|---|---|
| required_attribute.diff | 11.01 KB |



Joined: 11/19/2007