I use Drupal Commerce module to build my store. There are items in this store with sets of attributes such a color, size etc. I've created a content type to render a product. When I use a built in way to render this content type I have an interactive add to cart form with select lists or radio buttons for all attributes which loads values such a photo etc depend on it's values. Please suggest an approach how can I get this form using views?

I guess it should be quite a common task.

1 Answer 1


Create a View of your content.

Add field "Commerce Product: Add to Cart Form" to your View.

enter image description here

  • I wish It could be so easy. When I use views I can only have the add to cart form for one product among referenced ones. Or I can have a single add to cart for each product from product reference field. When using a builtin way there is an interactive form which affects the rest of the page via ajax.
    – Andriy
    Jul 13, 2016 at 8:00
  • @Andrey you'll have to be more specific about how you built your view in order to receive further insight
    – oksana-c
    Jul 13, 2016 at 9:20
  • I can only have a button for a one single product in referenced to the node. Or I can render a table or a list of all referenced products and they will have it's own add to cart button.
    – Andriy
    Jul 13, 2016 at 9:30
  • @Andrey It is still unclear how you set up your view (base table, is there any relationships that you are using to render the product). If you haven't solved this yet - check these threads for more clues - Product Attributes not showing inside a Views Add to Cart form field, How do I show product attribute fields in a view?
    – oksana-c
    Jul 31, 2016 at 10:22

Your Answer

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

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