Samples > JSP code snippets


JSP code snippet: Store catalog display

This JSP code snippet displays all available catalogs (master catalog and sales catalogs) associated with a store. It uses the StoreDataBean to retrieve all the CatalogDataBeans that contain the catalog information.

The StoreCatalogDisplay.jsp file is available under the following directory:


Prerequisites

  1. Your store must have at least one master catalog and one sales catalog.

  2. The properties file used by this snippet is WCDE_INSTALL /samples/Snippets/properties/Catalog/CatalogJSPCodeSnippetText.properties.

  3. Copy this file (StoreCatalogDisplay.jsp) to the directory WCDE_INSTALL/workspace/Stores/Web Content/ store/include.

You may want to copy the properties to the proper location for the store, for example, WCDE_INSTALL /workspace/Stores/Web Content/WEB_INF/classes/ storedir or merge it with the own properties files.


Usage

  1. Add the following line to the jsp file to which to add this snippet: <c:import url="${jspStoreDir}include/StoreCatalogDisplay.jsp" />

    Use ConsumerDirect as an example, you can add the above c:import statement into WCDE_INSTALL/workspace/Stores/Web Content/ConsumerDirect/include/styles/style1/CachedSidebarDisplay.jsp if you are using style1.

  2. In the code, uncomment the section marked by [Data Bean Activation].


Related concepts

Sales catalogs

Master catalog


Related information

Tutorial: Customizing the consumer direct sample store using snippets


+

Search Tips   |   Advanced Search