5

Hi I have a issue for which I searched everywhere but not getting any solution,

I have two content types Store and Deals with the following fields Store is having the fields 1.Store-title 2.Logo 3.Categories--> Added as a taxonomy term field. 4.Outlets This is the stores node adding form When I am adding a node of type store I am selecting the corresponding category terms with it and saving.

Other content type Deal having the fields 1.Title 2.Store-title---> This field is of content type Store and is added here as a node reference. 3.Outlets

This is the deals node adding form

When I am adding a node of type deal I am selecting a store here( In deals content type, store-title is added as a node-reference), and selecting its outlets.

Here store nodes titles as a dropdown to select particular store

Issue: I need a counter on the category terms, the counter should be based on number of deals added to that particular store node on respective categories. Here on terms should be the deals node count not the stores nodes count

Hope you understand the issue, I have seen the issue of same type where node counter is displayed but they show the count of nodes of the same content type where that taxonomy term is added like here http://www.brightwebsitedesign.com/how-to-use-views-aggregator-to-create-taxonomy-term-count-block, But I have a bit different, taxonomy is added to stores, but I need the count of deals( another content type) on the taxonomy term. If you still need more clarification please let me know.

This is very urgent Any help would be much appreciated!

1 Answer 1

3

You can achieve this with help of an additional relation. If you are following view creation from the post mentioned by you enter image description here

After selecting ' Taxonomy term: Content with term ' add another relation and choose the node referenced field - reverse and choose Require this relationship. (in your case 2.Store-title---> This field is of content type Store and is added here as a node reference)

Now you will get your count of deals

enter image description here

2
  • Great it worked fine, but I am not able to maintain the hirarchy parent-child relationship, so that I can made it accordion type. Also I want the empty categories to be shown, this way they got hidden.
    – Mudasir
    Dec 12, 2013 at 10:08
  • Maintaining the hierarchy here is must for me, I tried some modules like tree view, term reference tree, Hierarchical Select Taxonomy, but unfortunately not able to do.
    – Mudasir
    Dec 12, 2013 at 10:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.