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?
1 Answer
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.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically