Tutorials > Customize the Consumer Direct sample store > Customizing the consumer direct sample store using snippets
Register the e-mail template
In this step, you insert an entry into the database that contains the path to the JSP page that contains the e-mail template.
Tips:
- On the production WebSphere Commerce Server, use database-specific scripts called createEmailTemplate.databasetype in the WC_INSTAL../images/locale/screensnap/bin directory to register the e-mail template in the production database. This script ensures that the emlmsg_id you use is unique.
- To determine the store_id, run the following SQL statement and find your store in the resulting list: select storeent_id from storeent where identifier='MyApparelStore'.
Register the e-mail template:
Procedure
- Ensure the test environment is started.
- In a Web browser, open the following URL: http://localhost/webapp/wcs/admin/servlet/db.jsp
- Enter the following SQL statement and click Submit Query:
insert into emlmsg (emlmsg_id, jsppath, propertyfile, name, description, storeent_id) values (emlmsg_id, 'http://hostname:80/webapp/wcs/stores/servlet/MyApparelStore/template/EmailActivityMessage.jsp', '', 'EmailActivityMessage', 'E-mail activity message for the Snippet tutorial.', store_id);
Where:
- hostname
- is the fully qualified hostname of the machine running WebSphere Commerce Developer.
- emlmsg_id
- is a unique integer ID for this e-mail message template and store.
- store_id
- is the unique id that identifies this store.