Adding an e-Marketing Spot to a store page (WebSphere Commerce Accelerator)
Procedure
- Determine on which JSP files the spot will display. The spot can be added to multiple JSP files.
- Determine where on the JSP file to place the spot.
- Copy the sample e-Marketing Spot in to a new JSP file inside of the store Web application. Deploy the new JSP file.
- Customize the sample e-Marketing Spot to fit the layout of your JSP files.
- Within the e-Marketing Spot code, give the e-Marketing
Spot a name. Note: e-Marketing Spots should be descriptively named so as to include their location, such as HomePageAd, or CheckOutPageRecommendation. This helps to reduce confusion about where it will appear, and what content it should contain. If necessary, numbers can be added to the name to differentiate between two e-Marketing Spots appearing on the same page. e-Marketing Spot names must be valid Java identifiers. You must use this same name when registering the e-Marketing Spot in the database using the WebSphere Commerce Accelerator.
- Add the e-Marketing Spot to the JSP file by dynamically
including the spot using the JSTL <c:import> tag
structure with any associated parameters. Your code should look similar
to the following:
If you are not using JSTL, use the<c:import url="../../include/eMarketingSpotDisplay.jsp"> <c:param name="emsName" value="StoreHomePage" /> <c:param name="maxNumDisp" value="8" /> <c:param name="catalogId" value="${WCParam.catalogId}" /> <c:param name="maxItemsInRow" value="4" /> <c:param name="maxColInRow" value="3" /> </c:import>
<jsp:include>
tag. By using a dynamic include tag to add the e-Marketing Spot to the store JSP, the Dynacache feature can be enabled, so that the content of the JSP, excluding the e-Marketing Spot, will be cached. The e-Marketing Spot will be refreshed on every visit, thus displaying the proper dynamic content. - If you require more than one e-Marketing Spot per JSP file, repeat steps 2 through 6.
- Create
the e-Marketing Spot in the database using the WebSphere Commerce
Accelerator.
- If you plan to add the store ID, catalog ID, or language ID to the URL using the following convention, "langId=<%= languageId %>", note that the JSP in which the e-marketing spot is embedded must make the appropriate ID available. The IDs can also be retrieved through the command context, for example, getCommandContext().getLanguageId()?).
- The URL parameter, CatalogDisplay should start with "&" instead of "?" because the code isn't referencing the command directly.
- If a merchandising association activity is being scheduled
to the e-Marketing Spot, and the source of the association is based
on the content of the page, it can be set using the
setSourceCatalogEntryId(String source)
and thesetMultipleCatalogEntryId(String source)
methods provided incom.ibm.commerce.marketing.beans.EMarketingSpot
. For example, in the Product Display page, if the product displayed in the page is to be used as the source of the association, the following method will be invoked:
where eSpot is an instance of theeSpot.setSourceCatalogEntryId(productId)
com.ibm.commerce.marketing.beans.EMarketingSpot
class, and productId is the identifier of the source product. - Configure any filters as appropriate. You can apply
filters that exclude recommendations for any products or items which
may not have sufficient inventory, or which may already be in the
customers shopping cart. Filters are applied by adding a string similar
to the following to your JSP:
For a complete list of the applicable filters, refer to the API information for the EMarketingSpot.<c:set var="CATENTRY_NOT_EXPIRED" value="9" />
- Since spaces available to display marketing content
in an e-Marketing Spot might be limited, apply these rules to share
spot spaces between normal and experimental activities:
- Add an optional maximum number of result attributes to the e-Marketing Spot bean for each type of content to allow for content derived from experiments.
- By default, set the value of these attributes to the same value as normal campaign activities.
- The maximum number of allowed content from normal campaign activities should be equal to the maximum number of results (for normal campaign activities) minus the number of displayed results from experiments.
To find more information on migrating from Accelerator based marketing to Management Center based migrating, follow the links provided below:- Migrating campaigns and web activities from WebSphere Commerce Accelerator to Management Center
- Overview of migrating marketing from WebSphere Commerce Accelerator to Management Center Version 7
- Migrating marketing from WebSphere Commerce Accelerator to Management Center Version 7
- Migrating from the V7 Accelerator based marketing e-spot code snippet to the V9 Management Center based marketing e-spot code snippet
- Adding an e-Marketing Spot to a store page (Management Center)