Custom Notification snippets

You can add custom notification snippets to output custom data in your email notifications. A snippet is a simple keyword in curly braces (like {element_customsnippet}) and refers to a PHP file. The output of that PHP file will replace the placeholder when the email content gets prepared. With 'output of that PHP file' we mean whatever that PHP file will write to the output buffer when included.

Location of the custom snippet folder

Joomla: /components /com_configbox/data/customization/notification_snippets

Wordpress: /wp-content/plugins/configbox/app/data/customization/notification_snippets

Snippet and file name convention

Say you call your snippet ‘customsnippet’. The file name has to be called customsnippet.html.php, the placeholder {element_customsnippet}.

Data available in the snippet file

$orderRecord – Object holding all order data (see $orderRecord->orderAddress for order customer data)

$shopData – Object holding the shop data

Helpful tips

For getting some orientation and reference, see the code for the order overview snippet in

Joomla: 
/components/com_configbox/observers/notifications/elements/order_overview.html.php

Wordpress: 
/wp-content/plugins/configbox/app/observers/notifications/elements/order_overview.html.php