Sample e-Marketing Spot JSP snippets and the web activities they support
Many WebSphere Commerce starter store pages contain e-Marketing Spots that display marketing information using web activities. If you are adding e-Marketing Spots to a store page, you can review one of the starter store e-Marketing Spot snippets that provides the functions and parameters you need. You can then use the snippet as a starting point for your store.
The following e-Marketing Spot JSP snippets are used in the WebSphere Commerce starter stores to call the marketing services and return data to an e-Marketing Spot:
- ContentAreaESpot.jsp – A basic snippet that is formatted for the main content area.
- ESpotNavDisplay.jsp –
A basic snippet that is formatted for the sidebar.
The ESpotNavDisplay.jsp snippet also supports a specialized JSP fragment ESpotNavDisplayBrazilExt.jspf. This fragment adds more promotion-related functions to an e-Marketing Spot to support web activities that use the Display Promotional Price action or the Promotion Checker target.
- ScrollingProductsESpot.jsp – A snippet that displays a scrolling list of catalog entries.
- BrowsingHistoryESpotDisplay.jsp – A snippet that displays a paginated list of catalog entries.
- IntelligentOfferESpot.jsp – A snippet that displays dynamic recommendations for IBM Product Recommendations, formerly known as Coremetrics Intelligent Offer.
- WCDE_installdir/workspace/Stores/WebContent/storedir/Snippets/Marketing/ESpot
- WC_eardir/Stores.war/storedir/Snippets/Marketing/ESpot
<getData>
tag
to get data from the Get MarketingSpotData web service, and it provides
an example of the data returned. This snippet does not do any formatting,
pagination, or scrolling. This snippet is located here:- WC_installdir/samples/Snippets/web/Marketing/Campaigns
- WCDE_installdir/samples/Snippets/web/Marketing/Campaigns
- WC_installdir/samples/Snippets/web/Marketing/Campaigns
- WCDE_installdir/samples/Snippets/web/Marketing/Campaigns
To learn more about any snippet, open the snippet in your development environment where you have the starter store published. Then, read the comments in the code that provide examples of how to include the snippet on a store page and what the mandatory and optional parameters are. You can also open a starter store JSP page that includes the snippet and look at the code that specifies the parameters that are used for the snippet on that page.
The following section provides an overview of each snippet, and identifies a starter store page that uses the snippet.
ContentAreaESpot.jsp
This JSP snippet displays a basic e-Marketing Spot, formatted to fit in the main content area of a store page. The code in this JSP snippet can retrieve the following types of data from the Get MarketingSpotData service:- Catalog entries
- Categories
- Content, such as an advertisement
This snippet can display more than one data type at the same time. For example, you might have three web activities that are running in the e-Marketing Spot: the first displays catalog entries, the second displays categories, and the third displays content. If so, this snippet can display the catalog entries, categories, and content at the same time.
Example of a starter store page that includes this JSP snippet | Web activity actions that this snippet can support |
---|---|
Madisons–Department page: The ContentAreaESpot.jsp snippet is included several times on this page to display different data types. |
ScrollingProductsESpot.jsp
This snippet is used to display list of scrollable catalog entries or categories, within a scrollable pane widget in an e-Marketing Spot on a store page. This snippet creates a Dojo ContentPane widget for each catalog entry or category that the Get MarketingSpotData service returns. Then, the scrollable pane widget produces the scrolling effect. For information about the scrollable pane widget, see wc.widget.ScrollablePane.The code in this JSP snippet can retrieve the following types of data from the Get MarketingSpotData service:
- Catalog entries
- Categories
Example of a starter store page that includes this JSP snippet | Web activity actions that this snippet can support |
---|---|
Madisons–Home
See the e-Marketing Spot named HomePageFeaturedProducts, which displays a scrolling list of catalog entries for a clearance sale. |
BrowsingHistoryESpotDisplay.jsp
This snippet displays a paginated list of catalog entries in an e-Marketing Spot on a store page. The code in this JSP snippet can retrieve the following types of data from the Get MarketingSpotData service:- Catalog entries only
The snippet supports controls that customers can use to display the catalog entries as:
- A grid view
- A list view
Example of a starter store page that includes this JSP snippet | Web activity actions that this snippet can support |
---|---|
Madisons–My Account: Browsing History |
IntelligentOfferESpot.jsp
This is a specialized snippet that has an added function to include a refresh area that can display dynamic recommendations from IBM Product Recommendations. You can also use this snippet to display WebSphere Commerce recommendations for catalog entries, categories, and content because the snippet is based on the ContentAreaESpot.jsp e-Marketing Spot JSP snippet.Example of a starter store page that includes this JSP snippet | Web activity actions that this snippet can support |
---|---|
Madisons–Product Details page: The IntelligentOfferESpot.jsp snippet is included on this page to display dynamic recommendations for the product that the customer is viewing. | Plus: the same list of web activities that the ContentAreaESpot.jsp e-Marketing Spot JSP snippet supports. |