I use the latest dev version from 3th of November. I will use a second collection for rent products. For this I create a taxonomy call 'rent_collection' with some terms. This terms should be use in the secondary-menue. I rebuilt the menue and create a clone of the 'Collection Product' view.
The options for the Taxonomy menu in the vocabulary are:
Menu Location = 'Secondary navigation'
Menue Path Type = 'Commerce Kickstart Taxonomy'
After the rebuild of the menu the menue items are not in the Secondary Menue.
When I use:
Menu Location = 'Secondary navigation'
Menue Path Type = 'Default'
The menue items are in the Secondary Menue after the rebuild but the links behind the menu items are not correct.
I think the new approch from https://code.drupalcommerce.org/#/c/487/ is not far enough.
Comments
Comment #1
bojanz commentedComment #2
jsacksick commentedI'm pretty sure it doesn't work because of the check we're doing in the uri callback of the taxonomy_term
If you select commerce kickstart taxonomy, it will try to create a menu item that points to a link like this
vocabulary_machine_name/tid, but if you don't alter the uri of the taxonomy_term, this won't work, we could probably remove the vocabulary check here.Comment #3
uking commentedA the moment I have no access to my Environment. I am shure, that I add my vocabulary_machine_name in the array $machine_names with no effects. But I will check this tomorrow evening.
Comment #4
jsacksick commentedIf you want to do that, don't touch the kickstart modules, alter the uri callback like we're doing in kickstart_taxonomy for your own vocabularies this way pathauto will work and it will point to your new view.
Comment #5
uking commentedI add the menu items with this option in the taxonomy:
With the option:
the menu item are not added
For a quick check I change the kickstart module and add the vocabulary_machine_name 'rent_collection'
Clear the chache,too.
With a print I saw that the $uri is change to 'rent_collection/76'.
The differents between the two views are only:
The view 'Rent Collection products' is not shown.
Where can be the problem?
Comment #6
uking commentedI had try a new installation based on rc3 and create my own module:
Clone a new view "rentcollection" with the path rentcollection/%
The view is not shown. Where can be the problem?
Comment #7
jsacksick commentedWell you said your taxonomy vocabulary name is rent_collection but in your uri callback you wrote rentcollection :
Comment #8
uking commentedMany Thanks.
I solved the problem. I have recreate the taxonomy menue after I do the fix in my module. Than I fix my rent_collection_products view. To clone the collection view only is not enough.
Now I have some problem with the theme of the new view. But I assume this is not a bug, thus this bug can be closed.
Comment #9
marktheshark commentedDoes one need to create their own module to get the Commerce Kickstart Taxonomy menu items to work?
Also, does the Collection Product display view get regenerated once the menu is rebuilt?
I'm trying to create the same Collection-based view as the demo store, but there is no choice for the Indexed Node Collection term in Contextual Filters.
Note that the Collection vocabulary is not in the non-demo store, so I recreated it.
Comment #10
jsacksick commentedAre you creating a view based on the product display index ? Because this view is not taxonomy based anymore ?
Comment #11
marktheshark commentedI'm just modifying the view that I assume CK has adapted after rebuilding the taxonomy menu (whose items I have selected to go into the main menu).
I have not created any new views, it's one of the built in views (Collection Products).
The page path was automatically set to product_category/% (because I accidentally had added the Product Category taxonomy to the main menu as well, now I have set only the Collection vocabulary). I modified this path to be collection/%.
I'm currently stuck trying to set the contextual filter.
Comment #12
jsacksick commentedWe're altering the view by code for the "no demo" store but if you've saved the view then it should be read from the database.
Can you tell me if your new collection field is indexed ? (Go to admin/config/search/search_api/index/product_display/fields) and try to search for "Collection".
If it's not checked this is probably because your index is "overriden", if it's not overriden then clearing the cache should fix the issue.
Waiting for your feedbacks.
Comment #13
marktheshark commentedOK, so I have to mark the field for indexing, if I understood you correctly.
I will try this as soon as I get home and get back to you.
Could this be preventing the auto-generation of menu entries via Commerce Kickstart Taxonomy?
Comment #14
marktheshark commentedOK, we have success. :-)
It was the missing cache refresh + contextual filter in the view that was needed for the menu rebuild to work.
Thanks a lot.
Could you explain the difference between view in code or DB and how it affects this case?
Should I revert it to stock and rebuild the menu again?
Edit: I reverted the view but turns out it was a pretty bad idea... :-(
Will have to re-do the procedure. I don't quite understand why the default view uses some other vocabulary. Unless I am mistaken I created this vocabulary myself as well...
Comment #15
marktheshark commentedA minor remaining problem is that currently the menu links point to collection/11, etc. not to collection/shoes. In other words, the tid not the term name.
Comment #16
jsacksick commentedYou shouldn't have reverted the view as we're altering it by code.
Because we have a code saying "You're in demo mode : pick the collection vocabulary, else take the product category..."
The canonical uri of the taxonomy term is altered, basically what you need to do is to take the inspiration from the commerce_kickstart_taxonomy module, at some point we'll make this configurable.
Comment #17
marktheshark commentedThanks for the explanation.
Do you have a recommendation for making the taxonomy menu links use the term name and not the id?
Comment #18
marktheshark commentedStill no progress in making the taxonomy view override the default taxonomy listing.
The menu items point to vocabulary/term-id where the view does work.
I need it to point to vocabulary/term-name and also have the view work there as well. Currently vocabulary/term-id does the default taxonomy listing for me.
This works in the demo store, no idea how to make it work on the non-demo store...
Comment #19
jackdaniel9 commentedSubscribe.
Did you find a solution ?
With demo product_category Taxonomy... create by Commerce Kickstart Guys -> Build Taxonomy Menu Work and pagination don't work.
With another category Taxonomy ...create by us -> Build Taxonomy Menu Don't Work and pagination Work.
Comment #20
theodorosploumis