Bugzilla – Attachment 186497 Details for
Bug 4858
Ability to Charge for Print Notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4858: Add OPAC interface updates for print notice charging
Bug-4858-Add-OPAC-interface-updates-for-print-noti.patch (text/plain), 8.88 KB, created by
Jacob O'Mara
on 2025-09-16 17:01:56 UTC
(
hide
)
Description:
Bug 4858: Add OPAC interface updates for print notice charging
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-09-16 17:01:56 UTC
Size:
8.88 KB
patch
obsolete
>From 1a54af20e200e8805990c19dcb6759379ee60aa9 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@openfifth.co.uk> >Date: Mon, 30 Jun 2025 13:36:01 +0100 >Subject: [PATCH] Bug 4858: Add OPAC interface updates for print notice > charging > >- Enhanced opac-messaging.pl to provide print notice charging context >- Added warnings in OPAC messaging preferences for patrons without email >- Implemented helpful information section about avoiding print charges >- Updated OPAC account page with explanatory information about print >charges >--- > .../prog/en/modules/members/memberentrygen.tt | 5 +-- > .../bootstrap/en/modules/opac-account.tt | 14 +++++++ > .../bootstrap/en/modules/opac-messaging.tt | 37 +++++++++++++++++++ > opac/opac-messaging.pl | 9 +++++ > 4 files changed, 62 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 7091d09b382..9dc502753e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1603,9 +1603,8 @@ > [% IF print_notice_charging && !patron_has_email %] > <div class="alert alert-warning"> > <i class="fa fa-exclamation-triangle"></i> >- <strong>Notice:</strong> This patron has no email address. >- Print notices will incur a charge of [% print_notice_charge_amount | $Price %] each. >- Consider encouraging the patron to provide an email address to avoid these charges. >+ <strong>Notice:</strong> This patron has no email address. Print notices will incur a charge of [% print_notice_charge_amount | $Price %] each. Consider encouraging the patron to provide an email >+ address to avoid these charges. > </div> > [% END %] > <div class="messaging_prefs"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index e80a6b54936..680eb6fb2b3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -69,6 +69,20 @@ > [% END %] > > [% PROCESS 'account-table.inc' ACCOUNT_LINES = ACCOUNT_LINES, ENABLE_OPAC_PAYMENTS = ENABLE_OPAC_PAYMENTS, plugins = plugins %] >+ >+ [% IF logged_in_user.category.print_notice_charge > 0 %] >+ <div class="alert alert-info"> >+ <h5><i class="fa fa-info-circle"></i> About Print Notice Charges</h5> >+ <p>Print notice charges of [% logged_in_user.category.print_notice_charge | $Price %] >+ each help cover postage and processing costs when notices are sent by mail.</p> >+ <p><strong>To avoid future print notice charges:</strong></p> >+ <ul> >+ <li>Make sure your <a href="/cgi-bin/koha/opac-memberentry.pl">contact information</a> includes an email address</li> >+ <li>Update your <a href="/cgi-bin/koha/opac-messaging.pl">messaging preferences</a> to use email instead of print</li> >+ <li>Contact library staff to review your notification settings</li> >+ </ul> >+ </div> >+ [% END %] > </div> > <!-- / #useraccount --> > </div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index eceef2707bd..d7ee84e8a0a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Koha %] >+[% USE Price %] > [% USE AdditionalContents %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] >@@ -36,6 +37,20 @@ > ><p><strong>Settings updated</strong></p></div > > > [% END %] >+ [% IF print_notice_charging && !patron_has_email %] >+ <div class="alert alert-warning"> >+ <h4><i class="fa fa-exclamation-triangle"></i> Print Notice Charges</h4> >+ <p><strong>Important:</strong> Print notices incur a charge of >+ [% print_notice_charge_amount | $Price %] each to cover postage and processing costs.</p> >+ <p>To avoid these charges, please:</p> >+ <ul> >+ <li>Provide an email address in your <a href="/cgi-bin/koha/opac-memberentry.pl">account details</a></li> >+ <li>Select email delivery for your notice preferences below</li> >+ <li>Uncheck any print notice options if they are enabled</li> >+ </ul> >+ </div> >+ [% END %] >+ > <form action="/cgi-bin/koha/opac-messaging.pl" method="post" name="opacmessaging"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-modify" /> >@@ -269,6 +284,28 @@ > </table> > [% END %] > >+ [% IF print_notice_charging %] >+ <div class="alert alert-info"> >+ <h5><i class="fa fa-info-circle"></i> About Print Notice Charges</h5> >+ <p>Print notices incur a charge of >+ [% IF print_notice_charge_amount %][% print_notice_charge_amount | $Price %][% ELSE %]0.00[% END %] >+ each to cover postage and processing costs.</p> >+ <p><strong>To avoid these charges:</strong></p> >+ <ul> >+ [% IF !patron_has_email %] >+ <li><strong>Add an email address</strong> to your <a href="/cgi-bin/koha/opac-memberentry.pl">account details</a></li> >+ [% END %] >+ <li>Select "Email" instead of any print options for your notice preferences above</li> >+ <li>Ask library staff to disable print notices for your account</li> >+ </ul> >+ [% IF patron_has_email %] >+ <p class="text-success">â You have an email address on file. Make sure to select email delivery for notices to avoid print charges.</p> >+ [% ELSE %] >+ <p class="text-warning"><strong>â Important:</strong> You don't have an email address on file. Print notices may be automatically selected for your account.</p> >+ [% END %] >+ </div> >+ [% END %] >+ > [% IF ( SMSSendDriver || Koha.Preference('TranslateNotices') ) %] > <fieldset class="rows d-print-none"> > <ol> >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index 399451790a2..c802dc66f95 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -87,6 +87,15 @@ $template->param( > enforce_expiry_notice => $patron->category->enforce_expiry_notice, > ); > >+# Print notice charging context - category-based >+if ($patron && $patron->category && $patron->category->print_notice_charge > 0) { >+ $template->param( >+ print_notice_charging => 1, >+ print_notice_charge_amount => $patron->category->print_notice_charge, >+ patron_has_email => $patron->notice_email_address, >+ ); >+} >+ > if ( $opac_messaging && C4::Context->preference("SMSSendDriver") eq 'Email' ) { > my @providers = Koha::SMS::Providers->search( {}, { order_by => 'name' } )->as_list; > $template->param( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4858
:
186491
|
186492
|
186493
|
186494
|
186495
|
186496
| 186497 |
186498
|
186499
|
186500
|
186501
|
186502