In order for a field to be recognized as a product attribute it has to be a list item field, and it has to be required. I know it could be seen as duplicate code, but why not create a 'Product attribute' field that forces these requirements in order to facilitate the UX? Just a thought...

CommentFileSizeAuthor
#1 product-field-add.png12.22 KBBojhan

Comments

Bojhan’s picture

StatusFileSize
new12.22 KB

Something like this.

Only local images are allowed.

rszrama’s picture

Issue tags: +dcsprint5
rszrama’s picture

One thought is we can use a GET parameter in the URL or something and use it to alter the field edit form so it has to be required and single value. On subsequent edits, users should be able to change these, but we can just have a general warning displayed that "field_x no longer qualifies as a product attribute field because you changed setting_y."

blup’s picture

Here's a github branch with a Product Attribute field. Let me know if it's ok.
https://github.com/blup/drupalcommerce/commit/accad6d6e005d08de49c408598...

pcambra’s picture

Status: Active » Needs review
blup’s picture

Status: Needs review » Needs work

The previous branch was adding a product attribute field. As per discussion with rszrama, i'll try a new version using the existing list fields, with a 'product attribute' row in the 'manage fields' page (similar to Bohjan's mockup).

rszrama’s picture

Title: Product attributes should be a unique field » Add a row to a product type's "Manage fields" form for attribute fields

This still needs to be done, but I've added a separate issue for another aspect of this usability that needs to be improved: #1038320: Replace the "magic configuration" of attribute fields with explicit settings

rszrama’s picture

Status: Needs work » Closed (won't fix)

As it turns out, the issue I linked in #7 above evolved from a simple bypass option to an explicit group of settings enabling a field as an attribute field and adjusting its representation on the Add to Cart form. As such, I don't think we need to pursue this particular issue any further. I've flagged #1038320: Replace the "magic configuration" of attribute fields with explicit settings for review at the upcoming UX sprint, but I believe it will be a better approach than the magic configuration w/ a separate "add field" row on the manage fields tab.