What many people fail to understand, is that adding products to your store is a two stage process. This relationship is similar to a warehouse and retail location. A warehouse (product) is organized differently as you would organize a retail store (product display).
(http://www.drupalcommerce.org/node/293)
First we add some products to our store in the Products section (Store > Products > Add a product > Create [Your Product Type], or http://example.com/admin/commerce/products/add/[YourProductType]
). Each product represents a single variation of our product (a single size/color/type) and must have a unique SKU. For example, one variation of a T-shirt can have the SKU SHIRT-001-S and another variation can have the SKU SHIRT-002-M, to signify the variation in the actual shirt and size.
Second we should now add a content node to display a product. Navigate to the Add content page for the content type that you created for your products (Content > Add content > Create [Your Content Type], or http://example.com/node/add/[YourContentType]
). Here you should associate one or more products via the "Product Reference" field. You need to reference all the various sizes and colours of this product, so that all options can be displayed by this one node.
Attachment | Size |
---|---|
prd_rfrs.jpg | 31.96 KB |
Comments
No need for display nodes if your products don't have options
This 2-step Product > Product Display node process is presented as being essential in Drupal Commerce, but I don't believe it actually is, if your products have no options. By creating a View of type Commerce Product, you can directly display any and all fields from the Product entities however you want, and skip the Product Display nodes completely.
sounds good, but how to add description?
I like the sound of creating a view listing products without creating a display first. For a site with numerous low-priced, one-off items as products (e.g. a listing of low value secondhand books), the process of creating a display is too much work.
BUT out of the box Product has no description field. In principle it must be a fieldable entity in Drupal 7, but how can I add a description field to a Product, preferably without writing code? [EDIT; got it, it is under Store Configuration.]
Or would this be done better by adding a description field in the feature added to the Product Create page by Product Display Manager?
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
You can add any field
You can add any field you want to a product, just like a Content Type. Go to Product Types, admin/commerce/products/types, and select Manage Fields for the product type you want to modify. With the View-based product display I'm suggesting, I think there's probably no need for Product Display Manager at all, since you don't need any Product Display content types.
thanks
Yes, thanks. Your comment is very helpful. Maybe it should have been obvious, but it something which had not occurred to me until you pointed it out.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Product Reference? connecting these so my products shows
Product Reference? connecting these so my products shows would be great I don;t know how to do that.