Answer the question
In order to leave comments, you need to log in
How to make an expanded filter in Views and add dependent materials?
I am writing a ferry ticket shop. I took D7 + Commerce as a basis.
Could you please guide me how to organize the content and what modules to use for linking "tickets there" with "tickets back"?
There is a simple ferry schedule for every day of the year:
BPC -> TAO - 01/01/2015 (and subsequent dates) 12:30 and 21:00
BPC -> TAO - 01/02/2015 (and subsequent dates) 12:30 and 21:00
TAO -> BKK - 01/02/2015 (and subsequent dates) 8:00 and 13:00
TAO -> CAM - 01/01/2015 (and subsequent dates) 14:30 and 22:00
CAM -> TAO - 01/02/2015 (and subsequent dates) 1:30 and 2:00... etc.
I messed around with Views as much as I could. I created the "Ticket" material type, added two dictionaries "from" and "where", tried to add a link through the Entity reference. But I still can’t get the second block with returns to work so that it would correctly load what I need. I feel that the truth is somewhere nearby, but ... Throw, please, your "couple of cents" on this issue.
Ultimately, an open filter in Views (or somewhere else) should work, which would filter out a one-way ticket and load offers for return tickets filtered by date.
Do I need to create all possible options for tickets for this:
- add them for each date
- add "ticket there" and "ticket back"
Answer the question
In order to leave comments, you need to log in
I didn't quite understand what you want. Let's say I choose a ticket for the 20th there and a field appears next to me where I can choose a date back. Why not use views arguments? See for example how taxonomy page replacement is implemented in the standard Drupal distribution. You just pass two values to views:
1. From.
2. After what date.
And it outputs the values you need. What for here Entity reference I in general poorly understand.
And it outputs the values you need. What for here Entity reference I in general poorly understand.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question