Updating a catalog store page to use the Commerce Composer framework
GetPageDesign
service to retrieve the appropriate page design and content to render
your store page.About this task
Within the Commerce Composer framework, a page is a URL, with no content. The content of a page is defined by the page layout when the layout is assigned to the page. A layout is a layout template that has widgets, which are included within the layout template slots. The widgets are used to add the content for the page.
The following steps modify a store
catalog page JSP file to use the GetPageDesign
service and to follow the structure
for a catalog page that the Commerce Composer framework expects. Your modified JSP
page no longer defines any content for display. The content is determined when a layout is assigned
to your modified page with Commerce Composer. If no layout is assigned, your modified
page uses the default layout that you subscribed your store to use in an earlier task. If you do not
update your catalog page JSP files, your store cannot display a Commerce Composer
layout for the catalog pages.
Procedure
-
Modify the display JSP file for your store page to use the
GetPageDesign
service that retrieves Commerce Composer assets for rendering your store page. -
Add the store environment setup JSP fragments for the Aurora starter store to
your store directory structure.
-
Remove any referenced JSP files or JSP fragments that define how to display content on your
page that a Commerce Composer widget already provides. By removing the duplicate
functionality, you can ensure that the page uses Commerce Composer widgets and create
a cleaner organization of code.
- Go to the Stores\WebContent\store\include directory.
- Open the LayoutContainerTop.jspf file for editing.
- Remove any references to the LeftSidebarDisplay.jspf file.
- Open the LayoutContainerBottom.jspf file for editing.
- Remove any references to the RightSidebarDisplay.jspf file.
- Open the HeaderDisplay.jspf file for editing.
- Remove any references to the BreadCrumbTrailDisplay.jsp file.
- Save and close the files.
Note: Depending on the store page that you are converting to support Commerce Composer, you might need to complete extra steps.
- Open the Commerce Composer tool.
- Select your store from the Store list.
- Create a layout for your store. Assign the layout to your catalog page.
-
Preview the page to ensure that the page uses the assigned Commerce Composer
layout.