...
Tag | Description | Notes |
---|
{contact.first_name} | The client's first name | |
{contact.last_name} | The client's last name | |
{contact.email} | The client's email address | |
{contact.id_code} | The client's ID | e.g. 1500 |
{autodebit} | Whether or not autodebit is enabled for this client | i.e. 1 or 0, denoting yes or no, respectively |
{client_url} | The URI to Blesta's client interface | e.g. domain.com/billing/client/ |
Payment Links
...
Expand |
---|
|
Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, an example dump of the tag objects are shown below. | none |
{% for invoice in invoices %}
Invoice ID: {invoice.id_code}
Amount Due: {invoice.due}
Pay now at https://{invoice.payment_url}.
{% endfor %} |
The {contact} object | collapse | true |
---|
| stdClass Object
(
[id] => 1
[client_id] => 1
[user_id] =>
[contact_ |
|
Expand |
---|
|
Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, an example dump of the tag objects are shown below. Code Block |
---|
language | php |
---|
title | The {contact} object |
---|
collapse | true |
---|
| stdClass Object
(
[id] => 1
[client_id] => 1
[user_id] =>
[contact_type] => primary
[contact_type_id] =>
[first_name] => First
[last_name] => Last
[title] =>
[company] => Company Co.
[email] => first.last@domain.com
[address1] => 123 Main St.
[address2] =>
[city] => City
[state] => CA
[zip] => 90001
[country] => stdClass Object
(
[alpha2] => US
[alpha3] => USA
[name] => United States
[alt_name] =>
)
[date_added] => 2014-05-08 21:35:13
[contact_type_name] =>
[contact_type_is_lang] =>
) |
Code Block |
---|
language | php |
---|
title | The {invoices} array of objects |
---|
collapse | true |
---|
| Array (
[0] => stdClass Object
(
[id] => 505
[id_format] => {num}
[id_value] => 171
[client_id] => 1
[date_billed] => 2014-09-18 07:00:00
[date_due] => 2014-09-23 07:00:00
[date_closed] =>
[date_autodebit] =>
[status] => active
[subtotal] => 1.0000
[total] => 1.0000
[paid] => 0.0000
[previous_due] => 829.5010
[currency] => USD
[note_public] =>
[note_private] =>
[id_code] => 171
[delivery_date_sent] =>
[due] => 1.0000
[line_items] => Array
(
[0] => stdClass Object
(
[id] => 1181
[invoice_id] => 505
[service_id] =>
[description] => Line Item Description
[qty] => 1.0000
[amount] => 1.0000
[subtotal] => 1.00000000
[taxes] => Array
(
)
[taxes_applied] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[total] => 1
[total_w_tax] => 1
)
)
[delivery] => Array
(
[0] => stdClass Object
(
[id] => 510
[invoice_id] => 505
[method] => email
[date_sent] =>
)
)
[meta] => Array
(
)
[tax_subtotal] => 0
[tax_total] => 0
[taxes] => Array
(
)
[billing] => stdClass Object
(
[id] => 1
[client_id] => 1
[user_id] =>
[contact_type] => primary
[contact_type_id] =>
[first_name] => First
[last_name] => Last
[title] =>
[company] => Company Co.
[email] => first.last@domain.com
[address1] => 123 Main St.
[address2] =>
[city] => City
[state] => CA
[zip] => 90001
[country] => stdClass Object
(
[alpha2] => US
[alpha3] => USA
[name] => United States
[alt_name] =>
)
[date_added] => 2014-05-08 21:35:13
[contact_type_name] =>
[contact_type_is_lang] =>
)
[client] => stdClass Object
(
[id] => 1
[id_format] => {num}
[id_value] => 1500
[user_id] => 2
[client_group_id] => 1
[primary_account_id] =>
[primary_account_type] =>
[status] => active
[id_code] => 1500
[contact_id] => 1
[first_name] => First
[last_name] => Last
[company] => Company Co.
[email] => first.last@domain.com
[address1] => 123 Main St.
[address2] =>
[city] => City
[state] => CA
[zip] => 90001
[country] => US
[group_name] => General
[company_id] => 1
[username] => first.last@domain.com
[two_factor_mode] => none
[two_factor_key] =>
[two_factor_pin] =>
[date_added] => 2014-05-08 21:35:13
[settings] => Array
(
...
[language] => en_us
...
)
)
[applied_transactions] => Array
)(
)
[appliedpayment_transactionsurl] => Arraydomain.com/billing/client/pay/method/505/?sid=c6V8FU5X%2BdGtT9nZQ5DVOO2SsZdc5hC9k1ct6AiLtBs%3D
[autodebit_date] => (2014-09-22 07:00:00
[autodebit_date_formatted] => )
Sep 22, 2014
[payment_url] => domain.com/billing/client/pay/method/505/?sid=c6V8FU5X%2BdGtT9nZQ5DVOO2SsZdc5hC9k1ct6AiLtBs%3D
[autodebit_date] => 2014-09-22 07:00:00
[autodebit_date_formatted] => Sep 22, 2014
)
))
) |
|
Payment Links
This email template includes invoice payment links that you can make available in the email to allow customers to pay an invoice without having to login to their client account. Each invoice available in the {invoices} tag includes a payment_url. You can iterate over each invoice in the template to set the link. Consider the following example:
Code Block |
---|
|
{% for invoice in invoices %}
Invoice ID: {invoice.id_code}
Amount Due: {invoice.due}
Pay now at https://{invoice.payment_url}.
{% endfor %} |