I'm not sure if this is more of a feature request or a support request; I would assume that most of the basic stuff like this has been set in stone, so my best bet is to override the functionality instead of convincing everyone that my way is better :)

It seems a bit heavy handed that title should be a required field in product; you would think that SKU should be enough as a unique identifier. I'm making a site where there are multiple products that all share the same name, but have different SKUs and differ in other attributes (such as color, for instance). To simplify data entry and product management, I created a Master Product content type, which would hold the "Title" and dimensions of a product. The individual version of each product, identified uniquely by SKU, is then linked to a Master Product via node reference field (thus obtaining most of the attributes that describe it).

For instance, let's say my product is called "Omega Won-Ton Frisbee", or OWTF, for short. I have 6 OWTF's that are more or less identical - they have the same name, same dimensions, same weight, same material, etc (and I have no choice in this; there are thousands of products that are grouped with identical names). The only differences are SKU, color and price.

So my Master Product has one entry, OWTF (unique title to Master Product), along with all the more general attributes that describe the OWTF product. This way, I just have to enter all this data once. Then I go over to Products and enter 6 products, for which I would only enter 4 fields - SKU, Master Product (a reference), price and color.

What would be the best way to cleanly remove the Product "Title" field from the equation? It would seem that I must make a module to override it, altering the form and perhaps altering or overriding the form verification (which should be easy enough). Would there be anything else I should consider that might bite me further down the line? My two cents: this should be an optional field from the get-go, but then, I don't want to start a holy war discussion over it, I just want to achieve my goal.

Thanks in advance!


rszrama’s picture

Status: Active » Fixed

I'd just hide the title field on the product form and update your various product Views accordingly. We need a title on the product because we can't be assured that any particular site will have another way to establish a title for products that can be used in places like the shopping cart and checkout form. It's fine for there to be duplicate titles, and maybe we can even just get an automatic product title module like there is for nodes.

So, your hunch was correct, but also be on the lookout for places in the UI (i.e. default Views) may be referencing product titles. You might get into trouble with the product line item b/c it may depend on there being a title, in which case you might want to figure out how to import the title from your node to the products as you create them or something.

mausolos’s picture

Automatic entity titles would indeed be the way to go, here. In case others find this on a similar mission, here's the link to Auto node titles that has a patch and raises the question about such a thing:


mausolos’s picture

I ended up doing a very careful find-and-replace of the commerce_autosku module to make it into a custom commerce_autotitle module. I commented out the part that deals with field uniqueness (since this specifically didn't apply to my situation) and I made a few other tweaks as well. I'm not sure it's worth posting the converted module itself (since it's such a specific case), but I'll post the specific lines I changed so that someone else can duplicate this if they like.

Looking at the result, however, I do wonder if it could be abstracted easily to be a start towards a general auto-entity title project. If only I had time to play with it more...

I'll post more updates as I start to reference products in views and create displays.

itamair’s picture

yes. Definitely Automatic entity titles would indeed be the way to go, and it seems it started working also with Drupal Commerce entities ... except for their exposed tokens: http://drupal.org/node/1124484#comment-5588998


Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.