Images as "select-list" of Add-to-cart-form
On a site where we sell lets say ... Mugs :)
There are mugs "with ear" and "without ear".
Mugs without ear in colors : white and black
Mugs wit ear in colors : red and green
So I made one product-type "mugs"
SKU title
M1 Mug without ear black
M2 Mug without ear white
M3 Mug with ear red
M4 Mug with ear green
I want to use an image to represent the color instead of the dropdown-list of the "add-to-chart-form".
What I did so far:
I add an "Image-color"-field to add a thumb of the color to the product-type.
With "term reference" I add a specific color-name to the product-type.
I made a product-display with a term reference to make a taxonomy menu with two items: "mugs with ear", "mugs without ear",
and
a "product reference" field to show one producta time and to be able to change the colorname in the add cart form. (like on the Commerce-Demo-site)
What I want to do is to replace the list in the "add to cart form", by the images representing the color of the mug.
So I go to the mugs "without ears" and I see a white mug, and next to the big image, I see two images of the colors white and black.
When I go to the "mugs with ears" i've got the big image of a Red mug without ear, with next to it the two images Red and Green.
When we click on the colors it's like selecting with the "select-list" of "the add to cart form", but with images.
Maybe I'm going to much in detail but I want to be shure that you know what I'm looking for.
(I tried to create a block in Views with all thumbs related to the product, but I could find the solution.)
Comments
Close, but no cigar...
If you set this up right, it will automatically do as you desire - it's meant to work that way out-of-the-box.
I add an "Image-color"-field to add a thumb of the color to the product-type.
- Correct
With "term reference" I add a specific color-name to the product-type.
- No, you need to add a field of type "list(text)", rather than a term reference.
You would then add another "list(text)" field to choose "with ear" or "without ear". This makes data entry easier, and gives you the option of making it available to customers later if you need to.
I made a product-display with a term reference to make a taxonomy menu with two items: "mugs with ear", "mugs without ear",
- that sounds OK but is irrelevant to making this work.
If you have added a "product reference" field to your 'product-display' content type, and filled it with SKU values, then you should find that the image updates when you select the color and style.
http://www.drupalcommerce.org/faq/product-attributes
But there are still no images
But there are still no images to to select the colors instead of the dropdown list ... ??
... but where smoke is ...
Tnx for your help but I think it's not realy what I was (am) looking for.
I added three images:
1) lipstick.jpg are the products
2) lipstick-2.jpg product-display with the dropdown menu for the colors
3) lipstick-3.jpg the way I want to present the product with the color-thumbs to choose the color instead of the dropdown menu.
Whould this be possible avec Views ? The color-thumbs linked to the product.
I make a view of the color-images but I don't get it to be linked to the node. When I configure the field I "Link image to: Content" but it both ways the link goes to the store/products/ product page.
In the view I "Output the field as a link to "content/[product_id]" but the result is the same.
Closer to what I want .
This is the Uburcart-solution in Commerce-way.
I DownLoaded Commerce Cart Option (http://drupal.org/sandbox/ryan.armstrong/1146154) to replace the dropdown-menu by "radio-buttons"
And now I'll try to rewrite Ubercart Option Images (patch D7) (http://drupal.org/node/1140634) for DC.
Not shure if I'll succeed, so if someone wants to help me :)
feature request
I created a feature request on http://drupal.org/project/commerce.
http://drupal.org/node/1180016#comment-4563468
Ubercart Option Images
The Ubercart Option Images ( http://drupal.org/project/uc_option_image ) has a D7 version ( http://drupal.org/node/1140634 ).
Maybe there is a developer who can rebuild it to Commerce ??
I agree with Ryan
I agree with Ryan (comment http://drupal.org/node/1180016) that it "isn't anything for Commerce to support in core here".
This doesn't mean that there aren't more people interested in this function.
Here (http://drupal.org/node/1199222) is maybe a debut of a solution...
Sorry for putting up an old question.
I had the same problem and found a solution. I created a module. It is in my sandbox: https://www.drupal.org/sandbox/petu/2301343