Tags/topics: 
7
Answers
Vote up!
0
Vote down!

How to use product attributes like color or size?

I've followed this instruction but it's not what I want:
https://drupalcommerce.org/faq/product-attributes

I've created a list field for color attribute. And I want to set several colors for one product. I don't want to create multiple product variations, upload same photos and enter same prices. I want just to tick checkboxes with necessery colors. Is it possible?
It works ok when I set just one value in field settings - making it a dropdown list (or radio boxes).
How to make it work for multiple values in one field?

Asked by: RevalRomanov
on December 14, 2015

7 Answers

Vote up!
0
Vote down!

Thank you for having responded to my question, and yet the problem remains unsolved ... maybe I missed some important details ... may not put the appropriate version of a module or changing the wrong setting ...
So what version should I use 7.x-1 or 7.x-2?
Field should belong to content type or variation type?
What settings should I change for field?
What settings should I change for field display?

Answer by: RevalRomanov
Posted: Dec 15, 2015

Comments

There's a few steps - should be in the module's documentation so always check there first. You first create a Product Option Set within the Store > Configuration > Products > Option Sets. This is usually a Select List with the options you want (field name: Color, options: Red, Green, Blue).

Then you modify your Product Type (not the Product Display aka content type since an option is related to a product, not the content type) and create a new field, maybe called "Choose a Color", select the Product Option field type, and select the option set you created. You can also set if it is a required option set, etc.

There is also the "show on cart form" setting within the field that you want to set to it shows on the add to cart form for the product.

- Travis on December 15, 2015
Vote up!
0
Vote down!

I can't find Store > Configuration > Products > Option Sets
I even have no Store item in menu. Where should I look it for?
Products > Settings
Store settings > Product settings > Categories
Store settings > Product settings > Variation types
Or where?
Could you giveme some clue? Or just copy-paste system url to the page?

Answer by: RevalRomanov
Posted: Dec 16, 2015

Comments

You don't have Store in your menu? That's the primary Drupal Commerce menu.. make sure it's not disabled in your admin navigation menu, may need to run cron. You should be used to going in there in order to configure your store, products, and line items.

It's admin/commerce/products/option-sets

- Travis on December 16, 2015
Vote up!
0
Vote down!

I've installed commerce kickstart distribution and it has totally different menu.
admin/commerce/products/option-sets exists, thanks, Travis.
I've created option set Color and added one field to it - Color (term reference).
Then I go to product variation types and want to add new field but there is no Product option type in the list. I looked in content type - the same.
What next?

Answer by: RevalRomanov
Posted: Dec 17, 2015

Comments

Make sure to turn on the Product Option Set Reference module that is bundled with Product Option. This will open up the Option Set Reference field, which you then select the option you created before.

- Travis on December 17, 2015
Vote up!
0
Vote down!

Well, I had 7.x-2 version installed, 7.x-1 it fixed the problem. But not the way I expected.
Suppose we have a list of colors (common for all products), and when I create tshirt product I want to tick just few colors of that tshirt that I have.
How to do it?

Answer by: RevalRomanov
Posted: Dec 18, 2015

Comments

Hmm, Product Option should do just that for you. You create an option set called Color, populated it with a series of colors. Allow multiple and set the widget type to Checkbox/Radio. Then create a Option Set Reference field on your Product Type called Colors.

You would then just create a new production, say "T-Shirt A" and in the Color field you check off the colors that should be enabled on this shirt and save. The user will then see the colors you selected listed as checkboxes.

- Travis on December 18, 2015
Vote up!
0
Vote down!

This is a product add form
http://awesomescreenshot.com/01f5hzhof3
So what am I doing wrong?

This is an option set:
http://awesomescreenshot.com/0bf5hzio96
This is product type:
http://awesomescreenshot.com/0b95hzis5f

Answer by: RevalRomanov
Posted: Dec 21, 2015

Comments

Ah I see what I was missing. Commerce Product Option isn't strong enough to do what you want, but is needed. I have this setup on one of my sites and forgot that you need to also include this:

https://www.drupal.org/project/commerce_pricing_attributes

With this, you create a field in your Product Type with the field type of Pricing Attributes and Widget Type of Pricing Attributes Widget. In the field setting, you select the default value - your Color list and click save.

Now when you edit your product, you select the option, a div will open and allow you to select the options you want, add if selecting a Color is required, and also if you wanted to change the price of the product based on selection (maybe if you were also dealing with sizes and the sizes changed the price).

Sorry for forgetting that, let me know if that works.

- Travis on December 21, 2015
Vote up!
0
Vote down!

Once again, thank you Travis, now with your help, I'm close to tseli.Ya did you write to me ... when you add the product to limit the list to select the color values? After all, I can only choose the option set, but can not choose a list of values colors for choosing a buyer, it is an extremely important aspect of this project.

Answer by: RevalRomanov
Posted: Dec 23, 2015

Comments

Hi There,

I can't fully understand your question. When you select the option set, the first thing it does is shows you a series of checkboxes. One is to turn on the option (will say "Colors" in your case), one says if it's a "Required" option set, and another will say "Show price values..".

If you hit the checkbox for Colors, a window will drop down to show all the options, you can uncheck the ones that don't apply and also set a price difference if needed.

- Travis on December 30, 2015