Forgive me if this is already a planned feature.
Right now, to go from a default installation of commerce to a basic test environment you have to:
1) Create a product
2) Create a new content type for Product Display
3) Add a product reference field to the Product Display content type
4) Change the display formatter on the new product to be an "add to cart" form
5) Create the product
I think think steps 2, 3 & 4 should be done by default. This could be a new content type called Product Display
This is done by default in Ryan's development install profile:
2) Product Display content type - http://github.com/rszrama/commercedev/blob/f2d57b71257cd291dbfc1692579e3...
3) Product Reference field addition - http://github.com/rszrama/commercedev/blob/f2d57b71257cd291dbfc1692579e3...
4) Change to "add to cart" form - http://github.com/rszrama/commercedev/blob/f2d57b71257cd291dbfc1692579e3...
I think it's a big barrier to new users who just want to pay around with Commerce and see how it works to have to know how to create a content type and change the display formatter.
Comments
Comment #1
Anonymous (not verified) commentedAlso, I think the name Product Display should become the norm when talking about a node for displaying products as opposed to a Product Entity.
Comment #2
rszrama commentedAgreed on the "Product Display" language. We've avoided making the node type a part of the core module itself intentionally thus far, choosing instead to defer to installation profiles to do that. I'm open to reviewing the decision, though.
Comment #3
Anonymous (not verified) commentedCould you explain the logic behind letting installation profiles do it?
I guess Drupal Commerce is going to be a popular install profile.
You have a far better idea of what the most common use cases for Ubercart were, but my use case for the one ubercart site I made was: Install Drupal, Build site, build theme, find out that client wants to sell stuff, install ubercart, configure ubercart.
With that in mind, I think it'd be fairly common for people to install Drupal Commerce without the install profile. And the current user experience in that case is lacking, in my opinion. If there's going to be a default Product entity (and a default instance of almost every other entity), it seems like there should be a default Product Display node.
I've done a fair bit with Drupal (although this is my first time working with Drupal 7) and it took me an hour of fussing around to realize that "product display" was abstracted from "product" and that a Product Display required a product reference field.
The multiple levels of abstraction are good. I think having a default Product Display will help new users grasp the different separations easier when they are installing Drupal Commerce from scratch.
And as with every entity or content type, the user or the installation profile can easily make their own and opt to use that instead.
Comment #4
rszrama commentedI'm going to mark this by design for now, but I'll tag it for review at our sprint in June. The reason we're not creating a node type on install is that we don't want to make an assumption in the core module set about how a site will need to display products. While using a product display node type will likely be the most popular, it is far from the only way this can be done. Additionally, we finally do have the Commerce Kickstart installation profile to help new users get acclimated to the product display node type approach.
Ideally we'll be able to do more work on simplifying this in contrib, such as providing an inline product add/edit form widget for the product reference field. This module could easily be used in conjunction with Features to bundle together a node type for display products using this widget.
Comment #5
TimesArrow commenteddrupal 7 commerce installed comes with Store>Products>Product Type (=Product).
in the above 2) - step 2
what do i enter in the "Title field label" that has a default of "Title"?)
above 3) step 3
this is part 2/page 2 of above 2). "Save and add field" button. should i add a field that already exists in Store>Products>Product Type? if not what new field name do i create, any name (is it supposed to be tied back to
anything, somehow?).