Bug 5863 - Add to Your Cart disappeared if login disabled on opac detail
Summary: Add to Your Cart disappeared if login disabled on opac detail
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) minor (vote)
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 09:58 UTC by Marcel de Rooy
Modified: 2012-10-25 23:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2011-03-14 09:58:02 UTC
When cart is ENabled but opac login is DISabled or user not logged in, the Add to Cart link is not shown. This is caused by an error in the ready function.
The ready function refers to .tagbutton which does not exist in this context.
Adding the conditionals for opacuserlogin and loggedinusername around this statement resolves the error and restores Add to Cart.
NOTE: Problem appears only on Normal view tab. MARC view and ISBD are fine.


Additionally, the position in the list is adjusted to conform with MARC and ISBD: Add to Your Cart now follows Save to Your Lists. This is done by moving it from the ready function to the template html, reducing some additional checks in ready and doing it conform with the templates of the MARC/ISBD views.


Test this patch by toggling the values of opacuserlogin, opacbookbag as well as being logged in/out if applicable.
Comment 1 Chris Cormack 2011-03-16 23:30:51 UTC
Pushed, please test and mark resolved
Comment 2 Marcel de Rooy 2011-03-17 08:24:55 UTC
Works for me. Anyone else to close it?