Bug 40659 - Allow "My virtual card" format and content to be set using a Notices & Slips template
Summary: Allow "My virtual card" format and content to be set using a Notices & Slips ...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-15 12:55 UTC by Andrew Fuerste-Henry
Modified: 2025-10-09 20:42 UTC (History)
2 users (show)

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


Attachments
Bug 40659: Add new notice VIRTUALCARD (3.16 KB, patch)
2025-10-09 16:10 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40659: Add ability to customize OPACVirtualCard (5.66 KB, patch)
2025-10-09 16:12 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40659: Add ability to customize OPACVirtualCard (7.01 KB, patch)
2025-10-09 16:28 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40659: Close two divs in sample notice (1.14 KB, patch)
2025-10-09 20:42 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-08-15 12:55:54 UTC
Libraries would like more flexibility in the virtual card shown to patrons via the OPAC. Making that virtual card use a notice template would make is highly customizable.
Comment 1 Lucas Gass (lukeg) 2025-10-09 16:10:36 UTC
Created attachment 187695 [details] [review]
Bug 40659: Add new notice VIRTUALCARD
Comment 2 Lucas Gass (lukeg) 2025-10-09 16:12:45 UTC
Created attachment 187696 [details] [review]
Bug 40659: Add ability to customize OPACVirtualCard
Comment 3 Lucas Gass (lukeg) 2025-10-09 16:28:56 UTC
Created attachment 187697 [details] [review]
Bug 40659: Add ability to customize OPACVirtualCard

To test:

1. Turn on the OPACVirtualCard.
2. Log in to the OPAC as a patron and go look at your Library card ( opac-virtual-card.pl )
3. APPLY PATCH, updatedatabase, restart_all
4. Go again at your patron's card on the OPAC ( opac-virtual-card.pl ), it should look exactly the same.
5. Go to Tools > Notices > VIRTUALCARD
6. You should see the default content for the library card.
7. Play around with different variables from borrower, like [% borrower.firstname%] and branches, like [% branch.branchcode %]
8. You can also move around the barcode by using the placeholder value [% my_barcode %].
9. Put the [% my_barcode %] variable anywhere you want in the notice then go to the sys pref "OPACVirtualCardBarcode".
10. Change to different barcode types and relaod the library card page ( opac-virtual-card.pl ). You should notice the barcode type is being honored.
11. Turn on OPACpatronimages AND patronimages, then upload a patron image for your patron.
12. Use the [% my_image %] variable anywhere you want in the notice to place the patron image.
13. Leaving the [% my_image %] variable as is, turn off OPACpatronimages.
14. Reload the OPAC page, no image should display.
15. Delete the VIRTUALCARD notice.
16. Go back to the OPAC page and with the notice deleted you should see the hardcoded content. ie: the page should look exactly the same as it does without this patch.
Comment 4 Andrew Fuerste-Henry 2025-10-09 20:42:19 UTC
Created attachment 187706 [details] [review]
Bug 40659: Close two divs in sample notice