Customizing Evergreen Receipt Templates


Checkout receipt fully tricked out

At the 2014 MassLNC Evergreen Conference, Brian Herzog from NOBLE (North of Boston Library Exchange) and I presented the topic of Evergreen Receipts.  These receipts cover many areas of the library such as the patron side with checkout, payment, and items out receipts; but also the staff side such as transit slips, hold slips, and pull lists.  These receipts are HTML layouts with Template Toolkit variables that Evergreen uses to insert relevant information.  For example, with a checkout receipt (pictured right), there is arbitrary text such as ‘welcome to the library…’ but also a list of the items checked out with a bit of metadata.  This receipt is the most complicate (and pretty) that I’ve been able to manage with this medium.

The presentation covered topics including:

  • basic HTML tags to format receipts
    • <p>, <br/>, <ul>, <li>, <span>, etc.
  • basic css to add beauty
    • font-family, -size, -align, etc.
  • adding images
  • changing fonts
  • add the patron’s or item’s barcode to the receipt

One of the coolest things that I have discovered along the way is that a patron or item barcode can be printed on the receipt itself.  This feature requires adding a special font to a workstation (attached below) and the font family of the text to be changed when the system prints the receipt.  For example:

<span style=”font-family:’CodabarLarge‘; font-size:1.25em; text-align:center;”>

The patron barcode Template Toolkit variable is invoked with %PATRON_BARCODE% but is modified by the style text of the <span> tag.  The font is changed by the font-family property to the value ‘CodabarLarge’ which is the name of the font used to turn the normal Arabic numbers into a codabar barcode that most library scanners can read.

Brian is especially adept at receipt templates.  He spread the word about a wonderful feature that allows staff members to total the cost of the items checked out to the patron and print it on the receipt itself:

amount saved

Our consortia’s libraries love this feature and a great number of them have added this to their receipts.  Below is a writing sample of mine that documents how to edit receipt templates.

Finally, I’ve attached the full boat of receipts that I created.  All public and staff receipts have a unified design, use the barcode font, and use the ‘amount saved’ widget.

Attached Documents