Drupal Commerce: Display product attributes on Cart and Order pages

Tue, 11/25/2014 - 16:45 -- admin

Follow these steps to get product attributes showing up on the cart and order pages of your Drupal Commerce site.

Before completing the following steps, download and enable the Commerce Product Attributes module.  I'm not sure if you need Display Suite for this, but I have it on my site.

  1. Navigate to the "Manage Display" tab of your Commerce Product.  Note:  We are making changes to the actual Commerce Product type, not the Product Display!


     

  2. Scroll down and select the "Custom display settings" option, and then check the box next to Attribute View


     

  3. Save
  4. Select the custom display that you just created ("Attribute View", located in the secondary menu)


     

  5. On this page, you will configure what options you would like to show up when this custom display is used.  I usually hide everything, except the Title, and all term reference fields (these are the product's attributes).  This is an example of how a simple T-Shirt's "Attribute View" would look:

    Note that I'm only showing the title, and the term reference fields.  I've also changed the label's position to inline (it works better in the cart view), and have changed the format to "Plain text"
     

  6. Make sure to save this page, and then add a product to your cart (that has attributes).  Your cart should now display all attributes for the selected product:

    When viewing an order as an admin, you will now see the product attributes as well: