Using Notification Templates for Commerce 2.0 and Earlier Versions
Email notifications are sent automatically to users based on events in the store. To send them, you must first create a Notification Template. Notification templates under a channel define the sender, recipient, trigger, and content of an email notification.
The preferred way to set up notifications is by creating a notification template and then using it in an object action. See Notification Template and Defining Object Actions for more information. The following instructions specify how to create a notification template at the channel level.
To use notifications, first configure mail settings for your Liferay system. See Configuring Mail for more information.
To create email notifications in Commerce 2.0 and below:
-
Navigate to Site Administration → Commerce → Settings.
-
Click the Notifications tab.
-
Click the Notification Templates sub-tab.
-
Click Add (
) to create a new Notification Template and enter the following information.
- Name: New Orders
- Description: New orders template
- Account Groups: (leave blank or designate an optional account group)
- From Address: Your store’s email address (for example: orders@yourstore.com)
- From Name: Name of the store or a customer service representative
- Type: Order Placed
- Enabled: Switch the toggle to YES
- Subject: Email subject (for example: Your order has been received.)
- Body: You can use variables such as
[%ORDER_CREATOR%]
and[%ORDER_ID%]
to represent a customer’s name and order ID respectively. See the Notification Template Variables Reference Guide to learn more.
-
Click Save.
The notification template now sends an automated email upon receiving an order. When you create a template, a new notification is added to the notification queue whenever an order is placed. To view this, you can check the Notifications Queue sub-tab after placing an order. By default, the Liferay instance checks the queue every 15 minutes to send any unsent notifications. To learn how to change the interval, see Configuring the Commerce Notification Queue.