Hi Demian,

Thanks for the continued suggestions, which will be handy to getting it working.



On 22 Nov 2013, at 11:34 pm, Demian Katz <demian.katz@villanova.edu> wrote:

I believe that renewable should be a boolean value, so you shouldn't need to compare it to anything -- the check I put in should work (theoretically).

Since it isn't working, you might want to try var_dump()ing $transList[$key]['ils_details'] to get an idea of what the data actually looks like... that might offer a clue.

It's also possible that your ILS driver isn't doing what VuFind expects it to do, or that there's some other logic in VuFind that is preventing things from working, because the software was designed with the assumption that if renewMyItemsLink() is in use, that means that the ILS driver does not have the capability of determining renewability (not necessarily a valid assumption...  but that's how things were originally designed).

Let me know if I can be of further assistance.

- Demian

From: Trevor Dykstra [trevor@infoxpert.com.au]
Sent: Thursday, November 21, 2013 6:21 PM
To: Demian Katz; vufind-tech@lists.sourceforge.net
Subject: RE: [VuFind-Tech] Only display the renewMyItemsLink for renewable transactions

Thanks Demian for the suggestion.

 

It is interesting that when I add the suggested code then none of my renewMyItemsLink now display, so I'm trying to troubleshooting by "hard coding" the renewable value returned by getMyTransactions in the ILS driver to see what I still need to do.

 

Just a couple of other questions:
1. Do you know what would be valid values for "renewable" field is expecting for it to continue to the next statement - i.e. is it expecting it to be 'Y', true or something else?
2. Do I also need put an operator that "if 'renewable' = 'Y then Ö"

 

 

Regards,

 

Trevor.

 

From: Demian Katz [mailto:demian.katz@villanova.edu] 
Sent: Friday, 22 November 2013 12:47 AM
To: Trevor Dykstra; vufind-tech@lists.sourceforge.net
Subject: RE: [VuFind-Tech] Only display the renewMyItemsLink for renewable transactions

 

It might be worth adding:

 

if ($transList[$key]['ils_details']['renewable']) {
    continue;
}

 

right below:

 

foreach ($transList as $key => $item) {

 

in the _addRenewDetails() method.

 

Not 100% sure that will work, but itís worth a try.

 

- Demian

 

From: Trevor Dykstra [mailto:trevor@infoxpert.com.au] 
Sent: Wednesday, November 20, 2013 11:53 PM
To: vufind-tech@lists.sourceforge.net
Subject: [VuFind-Tech] Only display the renewMyItemsLink for renewable transactions

 

For VuFind 1.3 we would to only display the renewMyItemsLink for checked out items that have a renewable value of 'Y'.

 

At the moment we use "public function renewMyItemsLink($transactionLst)" for records retrieved by "public function getMyTransactions"

 

However, we noticed that renewMyItemsLink($transactionLst) ignores the renewable value returned by getMyTransactions (we return either Y or N) so a link is displayed whether it can be renewed or not.

 

Is there a way to only display the renewMyItemsLink for checked out items that have a renewable value of 'Y'?

 

My initial investigations indicate we would need to modify "CheckedOut.php" and modify the "private function _addRenewDetails" to check for the renewable value. Is this correct? If suggestion on the code we should add?

 

 

Regards,

 

Trevor Dykstra.