0

I do like how the default Drupal Commerce menu auto-updates with the # of items under that taxonomy like 'Furniture (9)'. I'd like to keep that nice feature, but I'd like to change the actual url of those Drupal Commerce main-menu links (point to my Views instead of D.C. default views /products and /product_category/%).

So I manually created 2 new views, one with a conceptional taxonomy filter that looks like /my-products/% and one without the conceptional filter /my-products. They work great.

Now I'd like to repoint the current Taxonomy main-menu to those values ('All Products' would goto my new /my-products 'all products' view, while the rest would goto the new /my-products/% taxonomy-based view based on the taxonomy's term-id).

So how can i do this, is this a template.php override of some sort or GUI based change I can't find yet? I tried here but the Path is hardcoded and not editable:

/admin/structure/menu/manage/main-menu

P.S. using Drupal Commerce Kickstart 2

NOTE: i guess i could remove their menu and just replace with my menu... But I'd lose that ability where D.C. updates the menu text with the # of items in the store, so hence why'd like to keep that :).

2
  • looking at the Drupal Commerce Kickstart Taxonomy module and just other articles, im guessing I have to maybe modify 2 hooks in a new module... Something like so: function mymodule_entity_info_alter(&$entity_info) { $entity_info['taxonomy_term']['uri callback'] = 'mymodule_taxonomy_term_uri'; } function mymodule_taxonomy_term_uri($taxonomy_term) { return array( 'path' => 'my-products' . '/' . $taxonomy_term->tid ); } but alas i dont see it ever entering my mymodule_taxonomy_term_uri function (and not sure how 'All Products' is also set). Any ideas? Feb 21, 2017 at 4:43
  • getting a bit further. seems like some people are trying to override here: drupal.org/node/1878088 Posted a comment today asking for help Feb 27, 2017 at 1:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.