0

I would like to build a simple block, where my visitors can check our shipping locations. There are 3 outcome of this form:

  1. Visitor can not find his/her county or city -> we dont deliver there
  2. Visitor finds his/her city and the city field has no description -> we delivery there
  3. Visitor finds his/her city and the city field has description -> we delivery with the desciption's conditions.

I have the following taxonomy tree in Location vocabulary:

  • County #1
    • City #1
    • City #2
    • ...
    • City #300
  • County #2
  • ...
  • County #15

What i did:

  1. I created a new view which shows taxonomy in a block, no pager, only 1 item.
  2. Fields: Taxonomy term: Description
  3. If description has value show that, if empty show "we delivery there"

And this is where I got lost. I would like to have 2 exposed filters, where the visitor can select his/her county and its children cities.

Any help, any suggestions are appriciated, thanks!

0

One way to do this is possible with contextual filters.

  1. Add a contextual filter based on term name
  2. Add a relationship to parent term.
  3. Add another contextual filter on term name, but this time use the parent term from the relationship.
  4. Tweak the settings (override number of items to show, probably remove the count from the item list, and switch to jump menu instead of regular list if you want a dropdown display.)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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