Transportr icon indicating copy to clipboard operation
Transportr copied to clipboard

Display ticket price

Open sedrubal opened this issue 7 years ago • 24 comments

Öffi can show the price for single trip tickets for the trips. (At least for trips in VGN). This would be an useful information, I think.

sedrubal avatar Aug 30 '16 11:08 sedrubal

Price would be easy to add. The question is just where to show it. UI mockups are welcome.

grote avatar Aug 30 '16 23:08 grote

That's great :tada: what do you think about adding it to the image at the top:

transportr-price

sedrubal avatar Sep 01 '16 14:09 sedrubal

That's a great start. I'd need to check what data is actually available in the API, but I think it has prices per leg (part of the trip). So it might also happen that you have a price for one leg, but not for another. How would this be handled in the above mockup?

Also, I'm concerned that adding one more line to the header causes problems with readability on the background graphics. We want to have specific background graphics at some point (in this example maybe actually showing a subway in Nurnberg) and then all graphics need to be very dark everywhere. This one has a shim added, but it doesn't go so high into the photo.

grote avatar Sep 01 '16 14:09 grote

I see... So maybe this is better?

transportr-price2

But then there is very much information in this view...

sedrubal avatar Sep 01 '16 15:09 sedrubal

Could indeed be a bit much. Maybe there could just be an info icon somewhere that opens a dialog with additional information when clicked? This could include the red messages and if there is a red message, the icon could be red or do you think this would not be clear enough for people that there is important information for that trip?

grote avatar Sep 01 '16 17:09 grote

I like this idea :smile:

sedrubal avatar Sep 01 '16 17:09 sedrubal

I just want to say that sometimes with just one ticket you can use more vehicles: in Milan with one ticket you can catch buses and trams if you travel within 90 minutes. So you don't have to pay another ticket for the other rides. When you play with APIs check this out in order to know if the information available is correct. It doesn't have sense to show wrong information.

airon90 avatar Sep 30 '16 09:09 airon90

It looks nice, but this only works for providers that return fares per leg, and not for providers that return the fares for the whole trip, per network, etc. (I think the current Fare implementation is a little lacking anyway, because it doesn't allow reduced prices other than child/adult or 1st/2nd class)

Why not add a card below the trip with all fare info?

full-duplex avatar Jan 09 '17 15:01 full-duplex

@full-duplex The idea changed half-way through this ticket. The latest one was to add an info icon that opens a DialogFragment that shows the message and fares (if any).

grote avatar Jan 09 '17 15:01 grote

Sorry, skipped over that part of your message.

I agree that would be a better solution for the fares, but I would dedicate that button to fares only and keep the message where it is currently. It's already hidden in the Journey list and would now require another additional click to see.

Maybe keep the message one or two lines and expand it on press for longer messages? Although that might be a discussion for another ticket.

full-duplex avatar Jan 09 '17 15:01 full-duplex

I think this information should also appear in the trip selection screen below the time estimate so you can easily compare any cost differences that may be.

cxxuzbim avatar Feb 11 '17 23:02 cxxuzbim

Almost one year later, I gave it a try with the following mockups based on the new design of Transportr 2.0:

fares-mockup or fares-mockup2

It addresses the case mentioned by @cxxuzbim by adding the price in the trip selection beyond the estimated duration. In the trip details, it could be added as a new row above the trip information that could contain the remaining time until the trip starts (as in the trip selection), the whole duration and the price for the whole trip.

To support prices per leg (part of the trip) and different ticket types, you could support a top on the prize in the upper right corner to open a DialogFragment with more detailed price information as suggested by @grote.

EDIT: added second mockup with different header row

What do you think?

ialokim avatar Jan 05 '18 19:01 ialokim

@grote any thoughts on this?

ialokim avatar Jul 22 '19 21:07 ialokim

@ialokim thanks for pinging me. I had missed your post. Also thanks for the mockup. This looks good. I prefer the top version, except the last screen on the right. Though, there you need to see how to get this blend over to the action bar (toolbar).

grote avatar Jul 23 '19 07:07 grote

Okay, so you like the first version in the first three places except when looking at the map where you would prefer the red background in the header? I will look into it when I find some time how we could implement the blend over. If it would result very difficult, would you also be okay with having the red background in the header row everywhere as in the second mockup?

ialokim avatar Jul 23 '19 18:07 ialokim

Okay, so you like the first version in the first three places except when looking at the map where you would prefer the red background in the header?

Yep, but it could be the white background as well if need be. A simple alpha animation should be possible, but let's see.

grote avatar Jul 29 '19 08:07 grote

The mockups from https://github.com/grote/Transportr/issues/231#issuecomment-355644068 are now incorporated by #627, but they just display the standard fare and just for the whole query.

We should think about how to display different fare types or fares per leg, e.g. inside a DialogFragment.

ialokim avatar Nov 02 '19 11:11 ialokim

Could you not show the price under the leg duration like you show it under the trip duration?

grote avatar Nov 02 '19 14:11 grote

Btw. how do you handle the total price display if the price for one or more legs are missing? Something like 10 + ? EUR?

grote avatar Nov 02 '19 14:11 grote

Could you not show the price under the leg duration like you show it under the trip duration?

I guess we could, but I kind of agree with your https://github.com/grote/Transportr/issues/231#issuecomment-244157003 some years ago about perhaps having too much information for one view. Also, there are cases where you would have prices per leg, but they don't properly sum up as e.g. a normal ticket is valid in some fare zone for e.g. 180 minutes no matter how often you switch means of transport. This may lead to additional confusion.

Also it seems that fares per leg are currently not supported by PTE.

ialokim avatar Nov 03 '19 16:11 ialokim

Btw. how do you handle the total price display if the price for one or more legs are missing? Something like 10 + ? EUR?

As I am using the fare for the whole Trip as defined in https://github.com/schildbach/public-transport-enabler/blob/master/src/de/schildbach/pte/dto/Trip.java#L51, it won't even display a price information if there is none available for the whole trip.

ialokim avatar Nov 03 '19 16:11 ialokim

We should think about how to display different fare types or fares per leg, e.g. inside a DialogFragment. [...] Also it seems that fares per leg are currently not supported by PTE.

Ok, so no fares per leg? Seems like you just get a list of fares, but don't even know what leg they are for.

What are different fare types (child vs. adult, etc.?) and is it worth showing those? Or can we close this ticket?

grote avatar Nov 04 '19 17:11 grote

I've just tested this on the Brazil network provider and it doesn't work, there's no price info for the trips. EDIT: it's a problem with Navitia, as it doesn't include fares in their aggregated GTFS feeds.

Xinayder avatar Apr 13 '20 02:04 Xinayder

What are different fare types (child vs. adult, etc.?) and is it worth showing those? Or can we close this ticket?

Exactly. PTE however reports an hard-coded enum field that seems not very flexible for special tickets available in some regions. Nevertheless, I think it might make sense to show this information somewhere if it is available.

ialokim avatar Sep 04 '20 16:09 ialokim