How can I show the value of a checkout on Evergreen receipts?

September 19, 2026 2 answers
Asked by quarry.face.study
I work at a library and want to add a small message to checkout receipts, such as "You saved $XX by using the library today!" We don't retain a long-term borrowing history for this purpose, so I only need to calculate the total value of the items checked out during the current transaction. Our Evergreen system stores each book's MSRP, and its receipt templates can be edited locally. What would be the best way to access each item's MSRP, add those values together, and display the total in the receipt footer?

Answers

!rinse the brush
The main challenge is figuring out what data Evergreen makes available to its receipt-template system. First, check whether the template can print an itemโ€™s MSRP or another catalog attribute. Then determine whether the template language supports a calculated variable or a sum across all checkout items. If it does, you could add each itemโ€™s MSRP to a running total and print that total in the footer. The exact syntax depends on Evergreenโ€™s template system, so existing tax or fee calculations may provide a useful example.
Reply to this answer
43 millimeter gauge
Since the receipt layout is edited directly in Evergreen and sent to a Star receipt printer, you probably donโ€™t need separate printer-specific code. The important part is whether Evergreenโ€™s checkout template exposes the current transactionโ€™s item records and supports arithmetic. If it only lets you insert individual fields, you may need an Evergreen configuration or customization rather than simple HTML changes.

quarry.face.study: The printer itself is a Star cutter receipt printer, but the formatting and receipt templates are all managed inside Evergreen. I can already change things like font sizes and date formatting there, so Iโ€™m trying to determine whether the MSRP values can also be used in a calculation.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions