stevenyvr987 / overdrive-evergreen-opac

Automatically exported from code.google.com/p/overdrive-evergreen-opac
0 stars 0 forks source link

Format types don't always match in popup to formats listed when checking out #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Testing and found a few examples of record where the listed format types don't 
match the option to select when checking out. These should be consistent.

Example record:
title: hotel vendome
https://bw.testing1.catalogue.libraries.coop/eg/opac/record/108226153

Available formats in search results and bib record say:
Adobe EPUB eBook
OverDrive Read

Go to checkout this book.

Formats in the My Account, also say:
Adobe EPUB eBook
OverDrive Read

But when you click on Checkout the popup gives the following formats.

You may select a formatType at this time
Adobe EPUB eBook
ebook-kindle

These options should be the same. not sure why ebook-kindle is offered when it 
should be OverDrive Read.

Original issue reported on code.google.com by lau...@ldsphome.com on 3 Sep 2014 at 2:39

GoogleCodeExporter commented 9 years ago
The difference in the two possible list of formats is probably due to Advantage 
Accounts. The basic list of formats is supplied in the Metadata object for the 
item. However, if logged in and if the item is available, then the Availability 
object will supply an action object describing Checkout. One of the descriptors 
is the format list, and this is what is shown in the action dialogue. What is 
shown otherwise is the basic list of formats.

So, the fix would be to always use the format list that comes with the checkout 
action object, if it is present. The complication in coding this extra logic is 
that Metadata and Availability are asynchronous API requests; we don't know the 
order of their arrival, and the code has scheduled them asynchronously rather 
than in parallel.

Original comment by steven3...@gmail.com on 5 Sep 2014 at 7:35

GoogleCodeExporter commented 9 years ago
Modified the code to show format types from the Availability checkout action 
object if the item is available, otherwise, show the format types from Metadata.

There was a bit of complication in rescheduling the API calls. For the search 
results or record details page, we call Metadata after Availability if logged 
in and the item is not available, whereas normally, Metadata and Availability 
are called independently. For place hold form, we schedule M and A in parallel 
and render the screen after both results are available.

Unfortunately, there is still a problem. If an available item is checked out 
and the ebook-kindle format is selected to be locked in, the OD server does not 
seem to accept this choice, because in the checkout list, the item will still 
show an unselected format type. Only if we select a non-kindle format, will the 
format is locked. It's as if ebook-kindle is a false format.

Original comment by steven3...@gmail.com on 8 Sep 2014 at 7:58