May 23, 2020

Disabling the send cart button in Koha

Our library has enabled the cart feature in the Koha OPAC, which allows patrons to create a list of books they’re interested in. Some patrons have used the “Send” feature of the cart, which allows them to send the cart to an arbitrary email address. But there have been several problems with this, such as bad email addresses causing the emails to be redirected to the sysadmin (me).

I decided to suppress the ability to send the cart by hiding the “Send” button. In Administration / Global system preferences, edit the OPACUserJS preference to look like this:

    $('#userbasket .toolbar a.send').hide();

If there already is a “ready” function in OPACUserJS, add the “hide” line shown above to that function.