How do I display products for sale?

On a clean install of Drupal Commerce, simply adding products to the backend is not enough to display them for sale with an Add to Cart form. Drupal Commerce separates the definition (on the back end) from the display (on the front end) of a product. This allows the same product definition to be used in any number of displays on the same site, across multiple domains, or through additional marketing channels while maintaining a single place where the core aspects of the product are administered (namely its SKU, price, and availability). Additionally, a single product display page may include any number of products for sale via the dynamic multi-product Add to Cart form.

The simplest way to display products for sale is by adding a Product Reference field to a node type and setting its display formatter to Add to Cart form. The process for doing this is described in the Product administration guide. The Add to Cart form will automatically adjust to accommodate single or multiple value product reference fields. When a product is added to the cart from a node using a Product Reference field, it will link to the node in the shopping cart block and form.

Another way to display products for sale on websites that don't require individual product pages is to create a custom View listing all of your products that includes an Add to Cart form field in the display. When a product is added to the cart from a View like this, it will link to the URL of the View in the shopping cart block and form.

There are certainly other strategies, such as using Panels to construct individual product pages, or interacting directly with the Product API in a custom module to build your own displays. We'll highlight additional modules and strategies in this FAQ page as they become available.


Domush on January 5, 2012

Can you please explain how separating the product and display improve upon the current norm of nodes and views?

I have yet to come across a node which cannot be displayed many different ways or pages which cannot display multiple nodes. This seems like a reinvention of the wheel. Can you elaborate as to use cases where this was necessary? So far, for me, it seems to just double my developer workload for no benefit.

Thank you