0

I've downloaded Drupal Commerce and created my 3 products. Everything else I've kept as the default. Then I wanted to created a catalog so users could buy items. Note: I've also installed and input API credentials for Drupal Paypal already. So then I went to create a view of type 'product display' as seen here:

https://drupalcommerce.org/user-guide/setting-product-catalog

But when I create a new view 'product display' is not one of the 'type' options.

So my question is, how do I get something to show as a product display item? somehow it seems I have to map the products I created to 'content types'...but shouldn't the module already do that?

I looked back through the documentation on that site, and undoubtedly I missed something, but I'm not seeing how this is done.

Note #2: I tried to install commerce kickstart, but I'm using WAMP and couldn't get it to work, so I have to trudge through on my own.

1

In the link you reference, when they say "product display", they are speaking of a Content Type (when a content type has a field type of "product reference", the content type then becomes a product display). If you have a content type set up that references products, that is the content type you would choose in "of type" in your view set up.

If you don't have a content type that references products, it's very easy to set up.

  1. Go to Structure > Content Type > Add Content Type > Name it Product Display (or any name) > Select Save and add fields
  2. You will then be able to manage your fields > Add New Field > Name it Product Reference(or anything similar) > Choose field type: Product Reference. > Widget Type: Use any default option or look into inline entity form - You'll find that very useful.
  3. Set up your field how you see fit for referencing products > Save
  4. Go set up your view and you'll then see "Product Display" as an option.

somehow it seems I have to map the products I created to 'content types'...but shouldn't the module already do that?

Yes, it does create a content type for you, but not out of the box. In order for this to happen, you create a brand new Product Variation Type:

Store > Configuration > Product Variation Types > Add Product Variation Type

This is where you choose to have a matching product display type set up automatically. This option sets up a new product variation type and a content type.

Its important to remember: A product display is another name for a content type. It becomes a product display because it references products.

1

You need to have the Product Reference module enabled and create your Product Display content type manually and add a product reference field to it. Then you can use this content type in Views.

Source: Creating Product Display Content Type

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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