JSP code snippet for e-Marketing Spots
Use the WebServiceeMarketingSpotDisplay.jsp sample snippet to display an e-Marketing Spot in a store page. The code uses Web services to call the marketing runtime to get the data to display in the e-Marketing Spot. Use this snippet for e-Marketing Spots that are used in Web activities managed with the Management Center.
The WebServiceeMarketingSpotDisplay.jsp file is available under the following directory:
- WC_installdir\samples\Snippets\web\Marketing\Campaigns
- WCDE_installdir\samples\Snippets\web\Marketing\Campaigns
Usage
The code in this e-Marketing Spot JSP file supports the display of the following types of data:
- Catalog entries (specified in Web activities and through merchandising associations)
- Categories
- Content (also known as ad copy or collateral)
If you intend to display only one type of data in the e-Marketing Spot, then you can remove the applicable sections of the code that will not be used.
This code requires the following two parameters:
- emsName
- This JSP file can be reused in different store pages by including it and assigning a unique value for the emsName parameter. This value should match exactly with an e-Marketing Spot name that is defined in the Management Center.
- catalogId
- The catalogId parameter needs to be passed because it is required to build the proper URLs.
This code supports the following three optional parameters:
- numberCategoriesToDisplay
- The maximum number of categories that can be displayed in the e-Marketing Spot at the same time.
- numberProductsToDisplay
- The maximum number of catalog entries that can be displayed in the e-Marketing Spot at the same time.
- numberContentToDisplay
- The maximum number of content that can be displayed in the e-Marketing Spot at the same time.