Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Cart
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
14 Apr 2016 at 10:32 UTC
Updated:
25 May 2016 at 05:24 UTC
Jump to comment: Most recent
We currently support optional attributes, but the logic is incomplete and lacks tests.
Optional attributes are used when the attribute might only be used for specific products or variations.
For example Color when not all products of that type have a Color.
Missing logic in ProductVariationAttributesWidget::formElement():
1) Hide attributes with no values (#access -> FALSE)
2) If an optional attribute has no "_none" option (meaning that it's defined on all relevant variations), make it required.
Plus, a test.
Comments
Comment #2
bojanz commentedExpanding to cover other aspects of optional attribute handling
Comment #3
harings_rob commentedComment #4
harings_rob commentedPR: https://github.com/drupalcommerce/commerce/pull/374
I think I have it covered by the tests, I kept them simple and only target the changes I made.
Comment #6
bojanz commentedThanks!
Comment #7
bojanz commented