drupal commerce browsable catalog - drupal-7

I am finding some troubles how Views works with taxonomy terms. I hope you can help me. :-)
I am building an e-commerce site with Drupal Commerce since it has all features I need for my project requirements but I don't know how I can list terms and nodes belong to concrete taxonomy on Views.
I have a product hierarchy taxonomy with all the site product categories. I use Taxonomy menu in order to show this taxonomy in a menu block allowing the user to select any term. A product display node only can be referenced to a sheet term on the taxonomy tree.
I want to use Views by listing as terms as nodes, if the user click on a non-sheet term on taxonomy menu, the view should show the subterms from clicked term. But in the other hand, if the user clicks in a sheet term then the view should show nodes referenced to the clicked term.
For instance,
Let's imagine I have the next taxonomy menu:
products
term1
term1.1
term1.2
node1
node2
term1.3
term2
node3
node4
If the user clicks on term1 term the view should list term1.1, term1.2 and term1.3 but if he/she clicks on term1.2 it should list node1 and node2.
How can I do this on Views? How can I list two different types of entities depending what term is clicked?
Thanks in advance!!

You need some js to do this. So you can use the dHTML_menu or similar dynamic menus.

Related

How to set taxonomy terms' meta tags in drupal, to display relevant nodes' title in the description meta tag

I have a drupal site and i use some taxonomy terms.
I use these taxonomy term pages to display those nodes having the relevant term.
As an example I have a taxonomy term Cars and in /cars page, are being displayed the nodes with term car.
Like Audi-BWM-Ford.
I need to configure - taxonomy terms pages- meta tags, and i need in the description meta tag area displaying the nodes' titles of each term.
Is there a specific token that can do that? Or any other way?
Drupal nodes are content objects, they are not supposed to be used to display meta informations for taxonomy terms.
If you really want it this way, you'll have to write some code.
I suggest you take a loot at this module: https://www.drupal.org/project/metatag
You'll learn how to assign metadata to taxonomy term pages
Then, you'll have to query you database to retrieve your node titles and set them as a meta.
For most cases metatag module should be enough.

Drupal 7 views taxonomy Simple Hierarchical exposed filter

I'm using Simple Hierarchical Select module for taxonomy in a profile page. The taxonomy is for a list of countries and their regions. The taxonomy hierarchy looks something like:-
United Kingdom
-London & South East
-South West
-Midlands
-East Anglia
United States
-Floida
-California
-New York
I want to display the taxonomy in views as exposed filters. Is it possible to expose the upper/first levels of the taxonomy as one filter and the second level of the taxonomy as another exposed filter so that is possible to search by country and then by region of said country?
You can choose at filters: Content: Has taxonomy terms (with depth; Simple hierarchical select) and set up the Depth to 1. If you select United Kingdom all child terms will show up.
It is not possible, because "Content: Has taxonomy terms (with depth; Simple hierarchical select) and set up the Depth to 1", is only available by content views, not with taxonomy or users views.
In field setting of that field you can check "Render Views filters as select list " and in views, that field from content can be used as expose filter as "Simple Hierarchal Select".

How to know the link clicked by the user to set the breadcrumb using views in drupal 7?

I'll try to explain my problem giving a little context first.
I'm building a catalog of products and to categorize them I'm using a taxonomy tree with 4 sublevels. Each product can be related with one or more subcategories.
I used views to navigate the taxonomy tree to access the products related with each subcategory. To manage the breadcrumbs in here I redefined the hook_breadcrumb() function on my template.php and this is working perfectly.
The problems start here: when I get to the last level of subcategories I have the respective products and when I click one of the products it will enter the node page of that product. At this time I lose my breadcrumb trail because I entered the node. I could get the taxonomy tree of that product to build the breadcrumbs but the problem is that the product can be related with multiple subcategory terms.
So, in order to solve this problem I think that I need to know from wich path trail the visitor arrived to the product. In other words, I need to know the last taxonomy subcategory that the user visited to enter a specific product so that I can build the breadcrumbs correctly with that information.
So, can someone help me on how to know the path that the user was before entering a node?
Thanks in advance!
You can check http://drupal.org/project/cookiecrumbs a recent project which uses browsers history to show breadcrumb

Show list of users based on taxonomy term (D7)

I have a taxonomy vocabulary "Department". In the user account I have a taxonomy term reference field with this vocabulary. So each user can be assigned to one or more departments.
I used the module Taxonomy Meny to show the taxonomy terms in my main menu.
Now I want to show a list of users when I click on a department in the menu.
Does anybody have an idea how I could do this?
Thanks.
Note sure here, but I suppose you should be able to use the views module to achieve this. Use can show all user nodes (or a list by choosing fields) and enter the department as a contextual filter.
Uou can use views in 2 ways, to produce pages or blocks. Contextual filters are a bit easier with pages, but that might confilt with yout module.
I like this tutorial, it gives a clear insight in contextual filters. It should get you started.
http://www.metaltoad.com/blog/using-drupal-contextual-filters-views

Creating a up reverse node reference list of a node in Drupal 7

What we are trying to do in Drupal 7: create a block that can be attached to a node view or taxonomy term view. In this block, a user can add links. These links can point to contacts, documents, links to other websites or taxonomy terms.
In the back-end, a user can select a contact, document or link. The user then gets a list of all nodes where this link is used. If the link is changed, it is updated in all the nodes where it is used.
In other words, a node reference that works in both directions, for multiple nodes. Any ideas are mightily appreciated :)
Hi have you tried to use Corresponding node references module? http://drupal.org/project/cnr
You can use:
http://drupal.org/project/content_dependency
It works for both node reference & entity reference modules automatically.

Resources