On the add to cart form, it would be nice to be able to use a product variation field to select a variation, rather than just the title or attributes. The attached patch adds a configurable widget for this. It needs some error checking for when the field is not available on the variations attached to a particular product, but this is a starting point.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | commerce-product-variation-field-widget-2909763-2.patch | 9.82 KB | zengenuity |
Comments
Comment #2
zengenuity commentedInitial version.
Comment #3
mglaman++ This is awesome.
This leaves a few questions
Comment #4
steveoliver commentedYeah, we should have done this instead of the title widget. I wonder if instead of deprecated, we can make this widget have a 'title' option to use as default/fallback and then update any configs using the title widget?
Comment #5
bhushan.nagaonkar commentedWhen I use this patch, I get following error,
Comment #6
jsacksick commentedShould we not extend the title widget instead? Add settings to be able to choose a different field rather than defining a completely new widget that duplicates most of the existing logic?