Tutorials > Customize the Consumer Direct sample store > Customizing the consumer direct sample store using snippets
Import and editing the e-mail template
In the next few steps we will create an e-mail activity using an e-mail template. This e-mail will be sent to a group of customers called a customer segment, and the e-mail will contain the e-Marketing Spot you created in previous steps.
You must configure e-mail accounts for inbound and outbound e-mail. See Configure the e-mail activity accounts.
Procedure
- Import the e-mail template By default, the e-mail activity template is in the samples directory of WebSphere Commerce Developer. In this step we will import the template into your workspace.
- In the Enterprise Explorer view, navigate to Stores > Web Content > MyApparelStore
- Right-click the MyApparelStore directory and select New > Folder.
- In the Folder name field, enter templates. Click Finish.
- Right-click the templates directory and select Import.
- Select File system and click Next.
- In the From directory list, enter or browse to WCDE_INSTALL/\samples\emailactivity\web.
- Select EmailMessageDisplay.jsp.
- Click Finish.
- Edit the EmailMessageDisplay.jsp file to display the e-Marketing Spot
Tip: If you did not perform the tutorial steps to create an e-Marketing spot, perform only steps 1 and 2 below. You can perform the rest of the steps in this section, but the resulting email will not contain the e-Marketing spot text.
Edit the EmailMessageDisplay.jsp file to display the E-Marketing Spot, MyApparelSpot, that you created in a previous step:
- Right-click EmailMessageDisplay.jsp and select Open With > Source Editor.
- Locate the following code and remove the two lines that read Remove this line to show E-Marketing Spot.
<%-- Remove this line to show E-Marketing Spot <c:import url="${sdb.jspPath}include/eMarketingSpotDisplay.jsp"> <c:param name="emsName" value="ESpot Name" /> <c:param name="catalogId" value="${catalogId}" /> <c:param name="userId" value="${recipientId}" /> <c:param name="storeId" value="${storeId}" /> <c:param name="clickInfoURL" value="${toolsURL}/ClickInfo" /> </c:import> -- Remove this line to show E-Marketing Spot --%>
- Replace the text value="ESpot Name" with the name of the e-Marketing spot, value="MyApparelSpot". The resulting code displays...
<c:import url="${sdb.jspPath}include/eMarketingSpotDisplay.jsp"> <c:param name="emsName" value="MyApparelSpot" /> <c:param name="catalogId" value="${catalogId}" /> <c:param name="userId" value="${recipientId}" /> <c:param name="storeId" value="${storeId}" /> <c:param name="clickInfoURL" value="${toolsURL}/ClickInfo" /> </c:import>