2

I have a color variation for my products... Not every product does have multiple colors.

I would like to let the user know that one item comes in multiple color (or even show every color available), in the product-category view...

If I add the color field in the "node: product list" in the manage display of the product, it only gives me the color of the first added color variation.

How can it be done ?

2 Answers 2

0
+50

Try creating a view that shows "commerce products" which by default starts off by showing all products by product ID which includes all variations. Play around with the fields and contextual filters to get it your liking.

0

If you could provide more information on version of Drupal and if you are using Commerce modules?

We have done this in the past using Commerce Fancy Attributes module to display colors for products : https://drupal.org/project/commerce_fancy_attributes

From module page:

Example usage: 0) Enable this module.

1) Create a Color vocabulary, add a text field called "Color" that will hold hex values.

Go to the "Manage Display" screen of that vocabulary, click the tab called "Add to Cart form - Attribute", enable only the color field (with the label hidden, and using the "Color" formatter).

2) Create several terms with matching hex colors (Black: #000000, White: #ffffff, etc).

3) Add a Color taxonomy_term_reference field to a product type.

4) When you add the color field on the product type, tick the checkbox "Enable this field to function as an attribute field on Add to Cart forms." and select "rendered term" as option of the "Attribute selection widget".

The Add To Cart form will now show the colors. Of course, imagefields can be used instead of "textfields holding hex values" rendered as images.

1
  • I already know how to add a product variation, this is not what I asked... Just wanted to display all variations of a product in the product list...
    – TheSquad
    Aug 28, 2013 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.