Bug 23568

Summary: Detect OPAC location by IP address
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: OPACAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Christopher Brannon 2019-09-07 02:37:14 UTC
Suppose the OPAC could determine the library location it is at based on IP address.  I suggest this because I assume that on preferences like HighlightOwnItemsOnOPAC, which gives a URL branch option in the settings, only works if you have an OPAC setup for each branch.  Unless I am mistaken and there is already a way to specify individual branches in the OPAC url without having to setup an instance for each.  In my scenario, we could set an IP address for each library in the branch settings, and then, if that ip address is detected by the OPAC, a setting like this could highlight the appropriate results.

This could also be a useful function for things like self check, down the road.
Comment 1 Owen Leonard 2019-09-08 19:00:16 UTC
(In reply to Christopher Brannon from comment #0)
> I assume that on preferences like HighlightOwnItemsOnOPAC
> only works if you have an OPAC setup for each branch

I believe it only works for logged-in users, using their home branch.
Comment 2 Katrin Fischer 2019-09-08 19:17:44 UTC
(In reply to Owen Leonard from comment #1)
> (In reply to Christopher Brannon from comment #0)
> > I assume that on preferences like HighlightOwnItemsOnOPAC
> > only works if you have an OPAC setup for each branch
> 
> I believe it only works for logged-in users, using their home branch.

That is correct.

What is the goal here? To allow highlighting the own holdings when the OPAC stations in the library are used?
Comment 3 Christopher Brannon 2019-09-09 18:01:13 UTC
(In reply to Owen Leonard from comment #1)
> (In reply to Christopher Brannon from comment #0)
> > I assume that on preferences like HighlightOwnItemsOnOPAC
> > only works if you have an OPAC setup for each branch
> 
> I believe it only works for logged-in users, using their home branch.

There is an option in the setting to work via URL branch.  Whether it works or not, I do not know, as we only have one OPAC URL.
Comment 4 Christopher Brannon 2019-09-09 18:02:57 UTC
(In reply to Katrin Fischer from comment #2)
> (In reply to Owen Leonard from comment #1)
> > (In reply to Christopher Brannon from comment #0)
> > > I assume that on preferences like HighlightOwnItemsOnOPAC
> > > only works if you have an OPAC setup for each branch
> > 
> > I believe it only works for logged-in users, using their home branch.
> 
> That is correct.
> 
> What is the goal here? To allow highlighting the own holdings when the OPAC
> stations in the library are used?

Pretty much.  To make this preference work in libraries, particularly that those that don't have distinctive URLs for each branch.