Discussions

A product with multiple attributes for one field...

Let me try to briefly explain my problem... Say we have a Shoe we're selling. The shoe will have a size and a color, and these are options you can set up with the product and select on the display page to add to the cart.

Now let's say shoes can also be made of different materials. For example, one model of shoe may come in Leather/Vinyl and also in Leather/Suede. This is problematic as for the cart to work, that attribute has to allow only one value. However I need it to be a combination of values (Leather & Vinyl vs Leather & Suede). As far as I can tell there is no way to do this with Commerce, short of making the multiple materials one option (so that Leather/Vinyl becomes on Taxonomy term rather than two). Are there any workarounds I could use here?

Posted: Mar 20, 2012

Comments

mengi on March 23, 2012

Seems like you would just create a list field in your product type. Make the options of the list leather-suede and leather-vinyl. Default it only allows 1 selection to be made. Make sure you click 'enable field to function as an attribute field on add to cart forms'. Make two products in your store.

On your product display content type, choose 'unlimited' for your product reference field. (click on edit in the manage field menu if you already made the field). Now when you make product content, select on both products you made in the store in the product reference field.

The user should have a select list now as a option to select leather/suede and leather/vinyl.