L
L
lexinthai2014-05-15 23:58:35
Content
lexinthai, 2014-05-15 23:58:35

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

2 answer(s)
N
Nikita, 2014-05-16
@nikita-b

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.

L
lexinthai, 2014-05-16
@lexinthai

And it outputs the values ​​you need. What for here Entity reference I in general poorly understand.

I so believe - to connect entities.
Create a taxonomy dictionary
Add terms
Create a "Ticket" content type
Set up Views
Get a result
Select a direction (e.g. "BKK", get three responses. Select "SAM" - get one response. Ok. Everything is fine. I guess by adding the second term "Where "I will get even more precise filtering in order to uniquely identify the direction. But how can I "show" returns after applying the filter? And filtered by the appropriate direction. So that if I select BKK - PHG in the expanded filters, I would receive returns along the route PGH - BKK

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question