Hello,

Would it be possible to have a display of a product that allows to order at once different attributes from it. As an example I want to order 1 yellow T-shirt XL + 1 red Tshirt XXL with one click to the add to cart button.

I would imagine a form display of the attributes that allows to modify the quantities of each piece .

A bit like on this site :
http://www.lajac.se/en/?n=2&p=3&gID=1&uID=1&pID=1&catID=1&groupID=13

Comments

rszrama’s picture

Status: Active » Closed (duplicate)
wehehehek’s picture

Hello rszrama! How do you exactly use the module that you've specified? I couldn't figure out how to make it work. Thanks!

wehehehek’s picture

Never mind. I've finally figured it out with the help of this article: http://drupal.org/node/1704100. Thanks!

digital fire’s picture

Is it possible you can post how you were able to complete this functionality?

I need to do something similar except I need a quantity to an attribute.

wehehehek’s picture

Hey Digital Fire

Yes, I can tell how I did it. Just let me know if you need more clarification because I am bad at teaching.

  1. Add a new view.
  2. Name the view to what ever you want to call it. For this one, I will use Test.
  3. From the 'Show' drop down, choose Commerce Product. Leave the the rest as is.
  4. If 'Create a page' and/or 'Create a block' is checked, please uncheck it.
  5. Click 'Continue & edit.'
  6. Under Displays, you will see 'Master*' and '+Add.' Click the one that says '+Add.'
  7. Select 'EVA Field' from the drop down menu (EVA = Entity Views Attachment).
  8. Click 'None' under Title. A window will appear with a title field. Name it to what ever you want (in this case I'll use Test) and click 'Apply (all displays).'
  9. Under Fields, remove 'Commerce Product: Product ID (Product ID)' by clicking it and clicking the 'Remove' button.
  10. Under Fields again, click 'Add.' Choose and check Commerce Product: Quantity input field and Commerce Product: Size (Note: Make sure you choose the product line you want this view to be on by reading the text below Commerce Product: Size. I will use the one for the tops, so I will check the one with this text: Appears in: commerce_product:tops.).
  11. After checking the two from above, click 'Apply (all displays).'
  12. A window for configuring 'Commerce Product: Quantity input field' will pop out. The 'Create a label' will already be checked and with a text under the Label that says, Quantity input field. This will be shown right next to the Quantity Input Field in your Product Page. I will uncheck this one for I want to use the Sizes as my labels. Click the 'Apply (all displays)' button once you're done.
  13. A window for configuring 'Commerce Product: Size' will pop out. Under Formatter, choose Plain text so the name of the sizes will not be as links. Click 'Apply (all displays)' once done.
  14. Step 17 might go before Step 16.
  15. Under Entity Content Settings, change the Entity type from 'None' to 'Node' by clicking 'None' and choosing Node from the selection and clicking the 'Apply' button.
  16. Under Entity Content Settings again, change the Bundles from 'None' to 'Tops' (I chose Tops because my Commerce Product: Size will be based on Tops. See Step 10.).
  17. Under Advanced, go to Relationships and click 'Add.' Choose and check Commerce Product: Node referencing products from field_product from the selection then click 'Apply (all displays).' Click 'Apply (all displays)' again on the next window that will pop out.
  18. Still under Advanced, go to Contextual Filters and click 'Add.' Choose and check Content: Nid from the the selection and click 'Apply (all displays).' Click 'Apply (all displays)' again on the next window that will pop out.
  19. Click 'Save' and you're all set. Check the product that you've tag as Tops to see if the view is showing or not.

Please let me know if this helps you. If I confused you big time, I apologize and would be willing to help you; just let me know. Thanks!

rituraj.gupta’s picture

Issue summary: View changes

Thanks wehehehek. You saved my time. I am using commerce kickstart package. Now I have a question. I have color option which is converting through fancy attributes module. When I choose the color the images get changes via ajax. this is fine but according to your above steps Can I get the quantity and size according to color option ? When I choose color, the quantity and sizes will get changed accordingly.

Please solve this issue. Thanks