Score:1

How can I create a simple dropdown to allow users the select an attribute (like ring size) from a Commerce 2 product page?

ng flag

This seems like it should be simple but despite reading docs and watching videos I cannot figure this out.

I have a Commerce 2 product variation type that I need to add a dropdown on to allow users to select a ring size. This will not affect the price.

I've been trying to use attributes but it doesn't seem to work correctly.

I've created a new attribute type (Ring Size) and add the sizes to it. But then I have to go into the variation edit form and it only allows me to select one of the ring sizes and then this one ring size shows up in a dropdown on the product page.

I'd like to have a list of ring sizes and for them to all be available on the product page for the user to select from.

Any direction on how to achieve this would be greatly appreciated. See the enter image description herescreenshot for an example of what I'm trying to accomplish.

Score:1
ng flag

I figured it out. Instead of using attributes I needed to create a new Order Item Type and put the ring size field on there. Then, set the product variation to use this new order item type. Easy.

it flag
Good deal, thanks for sharing the solution. The alternative would've been to define a variation for every size, but for rings, which can be resized, I imagine you don't want to be confined to the limits of that system.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.