Howto use taxonomy for product categories


i just managed to get the taxonomy module running and added a menu block with links to taxonomy/term/1 ...

I added a new field_tags field to the product type i use for my products in the hope that this will lead to something like an product category thing...

But unfortunately no products are displayed when i click on a taxonomy/term/1 link from my menu block.

How can i get this taxonomy page read and show my classified products?

Thanks in advance,


Posted: Dec 23, 2010


Scott J on December 26, 2010

You don't add the Term reference field (tags or catalog taxonomy) to your product type.

You need to create a new content type just to display products at admin/structure/types/add, and then add your tags field to the product display content type at admin/structure/types/manage/product-display/fields .

I have started adding installation and set-up documentation at http://drupal.org/node/1007434 to help make it a little easier to try out this great project.

joeX on December 27, 2010

Hi Scott,

thanks for your reply :) i have to say that this is not that intuitive as i thought in the beginning when i started with Drupal ;) Maybe the concepts are orthogonal compared to a normal shop software? :)

However, I already created some ProductTypes for my various product types and then created a content type with the product_ref and changed it to "Add to cart ...". When i try to add a content node i get the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'backup4all.taxonomy_term_node' doesn't exist: SELECT ttn.tid AS tid FROM {taxonomy_term_node} ttn WHERE (ttn.nid IS NULL ) ; Array ( ) in _taxonomy_menu_get_node_terms() (line 88 of /var/www/drupal-0.7-RC2/sites/all/modules/taxonomy_menu/taxonomy_menu.database.inc).

Maybe i forgot one necessary step?



Scott J on December 27, 2010

No, that doesn't look like a Commerce problem. I was getting errors like that because of Views not working properly with Drupal7 RC2. I tried again with D7 RC3, latest Views and Commerce alpha4 and those error messages are gone.

CrazyDiamond (not verified) on February 27, 2011

Thanks on info about product entity and taxonomy terms.
It is not obviosly, that they are not related in any way, and instead of 'tagging' products, we have to tag content type, which display these products as a nodes.
(am i get it?)

skygal on June 12, 2011

I see you can add fields under content type, and also under product type. So after I add the content type (Book), and add taxonomy terms, do I add the fields there? Or do I then go to product types, add a new product type (Book) by the same name as the content type I just created, and then add the fields there?
Thanks for your help...

Scott J on June 13, 2011

Taxonomy term field needs to be added to content type.

Are you using multiple content types for products? I'm just using one, called 'product display'. I'll go nuts if I start using multiple content types as well as multiple product types. Hopefully I won't need to use any more.