Customize the add to cart formΒΆ

Previously we learned how to create a product catalog.

Product catalog page

Now, lets customize the Add to cart form a little bit. We will learn how to add quantity field in that form.

Go to admin/commerce/config/order-item-types/default/edit/form-display/add_to_cart.

Product catalog default fields

Drag the Quantity field, and Save the form.

Product catalog quantity field

Go ahead and refresh the /products page.

Product catalog page with quantity field

And voila!! You can now choose quantity while adding products to cart.