Commerce Product Constructor

Table of Contents

Today I've made another decision to postpone using Commerce in our project where customer needed simple e-shop. I've actually made such decisions several times already, and that makes me feel unhappy.
I would like to say that I really enjoy Commerce presentations, (like everyone of you, huh?), and test installations are working great!
The idea of Drupal-way, and Rules, and Views-everywhere rocks.

But... Commerce is being developed for a long time already, and you still can't show it to your customers if they need to log in to admin section of their website!

Why?

That's node display + product entity problem.

In Commerce, product entity is a primary thing, and this is an item that holds product-specific data like SKU and price.
And this product can be displayed in several nodes at the same time, when you select specific product in product-reference field of the node.
That is a very strong Commerce point, - but at the same time, that is a weak point why we can't show Commerce admin section to our customers now.

Imagine that you have a simple store where you sell T-shirts.
Each t-shirt has size attribute and color attribute.
To create end-user product that is displayed in store to your visitors, you need to

1) Create 1 product entity per each attribute intersection (so, you have to create 1 product entity for 'color: red, size: s', then 1 entity for 'color: green, size: s', and so on, so if you have 5 colors and 4 sizes, that is 20 product entities!

2) then you go to node creation, create 'display' node and in product reference field you select all your created t-shirts. That is a difficult thing to do when you have 100 t-shirts, each having 20 product entities, so you have to select 20 entities that you've just created from 2000 product entities that you already have in your store.

Do you think you will be able to explain this to you customer?

At the same time, from architectural point of view, the product entity approach is a feature that allows to do things like stock management, image handling, unique sku for each attribute combination, multiple display pages for single product - in a right way.

So, I think that what most of average e-stores need - is a good interface where product entities are created automatically in background, while keeping product display node primary thing to website admin.
I am not the only one who had this idea :)
There is already a couple of modules that are trying to address the issue, from different sides:
Commerce Bulk Product Creation and
Commerce Product Display Manager

Personally, I don't think that Commerce Bulk Product Creation alone makes it a lot easier to manage your store. It has a really nice generator of products, but it looks like it is supposed to be used once for a product creation. It doesn't maintain the dynamic connection between node display and product entities, so you can't quickly update product entity when you edit display node (well, there is product-reference connection, but it's not usable). And if you need to change price for all combinations of attributes of specific product, you are in trouble.

Commerce Product Display Manager is trying to solve the problem in a different, more dynamic way.
You get separate tab on product display node, called 'Products', where you can see all back-references to product entities.
But you can't create product entities from display node here.

Actually, you will be able to do it soon! Read this - the maintainer of the module says that he committed some code that allows website admin to create product entity from product node.

But, there is still a long way to go.

To my understanding, what we need is a combination of  Commerce Bulk Product Creation and enhanced Commerce Product Display Manager, with significant amount of ajax magic, so the everyday workflow of e-store admin looks like this:

For product creation:
Admin goes to node/add/product and enters basic product information, like title and description.
There is also fieldset which is a much more compact version of current Bulk Product Creation.
When user selects all the necessary options and uploads image, it clicks "Generate" button and the fieldset is ajax updated with a list of generated product entities.
Admin clicks 'Save' and that's it, we have a display node with all product entities generated.

For product updates:
Admin goes to node/%/edit and there is a fieldset which is rendered as a list of all product entities, with 'edit' link on each item (it's very similar to current Product Display Manager functionality, but I think it's important to show the product list on the main node edit tab, not on separate tab, because it is a primary node information.) I think it would be great to have some fields like product entity price exposed for in-place editing here.
There is also an ajax-enabled product generator feature available here, too.

From implementation point of view, this can be a new widget type (so it will appear near 'autocomplete' and 'select list' when you manage fields in your product display node)

This approach won't work for every store, but imho it will work relatively good for a big amount of websites.

Or, may be the proposal described above has some serious flaws which I don't see? Feel free to leave your feedback.

When we have functionality similar to this, I think it will be a lot easier to convince customers that Drupal Commerce is the best e-commerce platform ever!