Adding support for the e-Marketing Spot properties action to an e-Marketing Spot
As a store page developer, you can add support for using the e-Marketing Spot properties action in an e-Marketing Spot. Before this action can be used in a web activity, support for the type of property information that returns to the e-Marketing Spot must be added to the store page that the activity runs on.
- CSS files
- JSP pages and JSP fragments
- Sales catalogs
Before you begin
- Identify the property information that your Marketing Manager or business user wants to use in the e-Marketing Spot properties action. Ensure that this information, such as a CSS file, JSP file, or JSP fragment, exists for your store.
- Identify the e-Marketing Spot that is going to be used with the e-Marketing Spot properties action in a web activity.
- Identify the store page that is going to be used to display the activity.
Procedure
- Create, or locate the e-Marketing Spot JSP file that you are adding support for the property information that is being used by a web activity. Open your e-Marketing Spot JSP file for editing.
- In your file management program, navigate to the samples
directory that contains the sample eMarketingSpotProperties.jsp file. This
file contains sample code that illustrates how to support the handling
of custom e-Marketing Spot properties that are returned from a web
activity that includes the e-Marketing Spot Properties action. Open
this file to view its contents.This file can be found in the following directory:
- WC_installdir\components\foundation\samples\Snippets\web\Marketing\Campaigns\
- WCDE_installdir\components\foundation\samples\Snippets\web\Marketing\Campaigns\
- Use this sample JSP file to help customize or create your
e-Marketing Spot JSP file to support e-Marketing Spot properties.
When you create or customize your JSP file, add your JSP file into
your store directory for e-Marketing Spot JSP files.
For example, WC_eardir\Stores.war\store_dir\Widgets\ESpot\include where store_dir is the directory name for your store.
- Locate the JSP file for the store page that is to display the activity and e-Marketing Spot. Open this store page JSP file for editing.
- Customize your store JSP file to support the use of your
e-Marketing Spot and e-Marketing Spot properties.Include the following code to add support for the property that you are returning information for in your e-Marketing Spot.
Where yourESpot.jsp is the name of the e-Marketing Spot JSP created in step 3. The value eMarketingSpotName is the name of the e-Marketing Spot on which the Marketing Manager should set up the web activity that uses the e-Marketing Spot Properties action. For example, you can set eMarketingSpotName to be Stylesheet if you want to return a CSS style sheet to the e-Marketing Spot to change a style element on the store page.<%out.flush();%> <c:import url=${env_jspStoreDir}Widgets/ESpot/include/yourESpot.jsp"> <c:param name="emsName" value="eSpotPropertyName"/> </c:import> <%out.flush();%>
The location in the file where you add this code is dependent on the type of property you are adding, and where on the store page you want your change to display. In the examples that are provided, Stylesheet and ExtraWidget are the names of the e-Marketing Spot.
- For example, if you are returning style sheet information, you
can include the following code:
After the following lines of code in the beginning of your file:<%out.flush();%> <c:import url=${env_jspStoreDir}Widgets/ESpot/include/yourESpot.jsp"> <c:param name="emsName" value="Stylesheet"/> </c:import> <%out.flush();%>
<!-- Begin Page --> <div id="page">
- If you are including support to add a widget that is called ExtraWidget,
to your store page, include the code to support adding the widget
in the location where you want the widget to display. For example,
if you want a new widget to display after the main content in your
page, but before the page footer content, add the following code:
Before the following line of code:<%out.flush();%> <c:import url=${env_jspStoreDir}Widgets/ESpot/include/myEMarketingSpot.jsp"> <c:param name="emsName" value="ExtraWidget"/> </c:import> <%out.flush();%>
<!--End Page Content-->
.
- For example, if you are returning style sheet information, you
can include the following code:
- Save and close your file.
What to do next
Confirm with your Marketing Manager or business user that they can include the supported properties within an e-Marketing Spot properties action in a web activity and change the storefront behavior when they activate the activity.