Invoice Template
CM Gift Card can attach a PDF invoice for the customer’s order to the email sent after the payment is completed. To use this feature, you need to enable it in CM Gift Card’s configuration and install the mPDF library.
You can design your invoice template in CM Gift Card’s configuration using HTML and CSS. After the invoice is generated, it is converted to PDF by the mPDF library and attached to the order confirmation email.

Here are the tags available for the invoice. They are replaced with the actual customer and order information before the invoice is sent.
- {customer_name}: Customer’s name
- {customer_email}: Customer’s email address
- {customer_address_1}: Customer’s address line 1
- {customer_address_2}: Customer’s address line 2
- {customer_address_3}: Customer’s address line 3
- {customer_postal_box}: Customer’s postal box
- {customer_city}: Customer’s city
- {customer_state}: Customer’s state
- {customer_postal_code}: Customer’s postal code
- {customer_country}: Customer’s country
- {order_number}: Order number
- {order_date}: Order’s completion date, or its creation date
- {payment_method}: Payment method’s name
- {transaction_id}: Transaction ID
- {order_items}: List of order items (gift cards)
There is one special tag, {order_items}, which shows the list of gift cards in the order. By default, the output of {order_items} is an HTML table element (<table>). The code that generates this table is in
administrator/components/com_cmgiftcard/layouts/invoice_items.php
To customize the output of the order items, create a new file:
administrator/components/com_cmgiftcard/layouts/invoice_items_custom.php
Copy the content of invoice_items.php, paste it into invoice_items_custom.php, and customize invoice_items_custom.php. Your customizations are not lost when you upgrade CM Gift Card, because the file invoice_items_custom.php is not part of CM Gift Card.
Under the Invoice Template field, the Sample button gives you a ready-made design, and the Preview button shows you what the design in the editor looks like.
Please don’t hesitate to contact us if you need help customizing the invoice template or the gift card list in the invoice.