How to keep product category active when viewing a product in Drupal Commerce

If you have your product categories-vocabulary in a menu, Drupal Commerce can't by default activate the active-trail when viewing a product node. This can be bad UX, since user has to remember from which category he came to the current product.

Answer to this problem is Taxonomy Menu Trails-module. It sets the active-trail on nodes if you have that node's terms in the menu.

Here's basic instructions how to get it working with Commerce.

  1. Enable the module
  2. Edit the Content type you want to enable this function for (in case of Commerce, edit the product display: Structure -> Content Types -> Product Display
  3. Under Taxonomy menu trails-tab, check the vocabularies you want to use. Check the other settings if necessary
  4. Hit Save

Add new comment