Load a Commerce Composer page as the Shopping Cart page
In this lesson, you load a Commerce Composer page, which you use within the
Commerce Composer tool as a new Shopping Cart page.You can use the
Data Load utility to load information into the database to register your new page. With the Data
Load utility, you can also load information to associate your new page with the layout that you
previously loaded. Before your page can be managed with the Commerce Composer tool, you must
associate the page with a page layout type (PageGroup) within the Commerce Composer
framework.
Procedure
-
In a File Manager, go to the DataLoad directory within your new widget
project.
For example, if your new widget project is at the top level in your workspace the filepath to the com directory, can be workspace_dir\NewWidgetProject\Dataload.
-
Create a folder. Name the folder
page
. -
Go to the directory NewWidgetProject\DataLoad\page.
Create two input CSV files within the directory:
- page.csv
- layoutAssignment.csv
-
Open your new page.csv input CSV file for editing.
The file is used to create a content page in the Commerce Composer tool. Within the page.csv file, specify the following columns and values:
- PageGroup
- The page group, or type, for the layouts that the page is assigned with. The value must match the value that you set for the PageGroup within the layout.csv file previously. For the tutorial, set the value to be Content
- PageAdminName
- The name of the store page that displays within the Commerce Composer tool. The name helps business users identify the page, for example, SampleShoppingCartDetailPage
- Deletable
- A flag that indicates whether business users can delete the page from the store with the
Commerce Composer tool. You can set the following values for the column:
- TRUE
- Business users can delete the page.
- FALSE
- Business users cannot delete the page.
- AdminEditable
- A flag that indicates whether business users can edit the page AdminName within the Commerce
Composer tool. You can set the following values for the column:
- TRUE
- Business users can edit the AdminName.
- FALSE
- Business users cannot edit the AdminName.
- UrlConfigurable
- A flag that indicates whether business users can configure the URL within the Commerce Composer
tool. You can set the following values for the column:
- TRUE
- Business users can configure the URL within the Commerce Composer tool.
- FALSE
- Business users cannot configure the URL within the Commerce Composer tool.
For more information about completing your page.csv input CSV file, see page input file. -
Open your new layoutAssignment.csv input CSV file for editing.
The file is used to assign layouts to one or more category pages, catalog entry pages, or content pages. Within the layoutAssignment.csv file, specify the following columns and values:
- LayoutName
- The external reference name for the layout. For the tutorial, set the value to be SampleShoppingCartDetailPageLayout.
- PageGroup
- The page group (type) to which the layout belongs. The value must be the same as the value that you defined within the layout.csv. For the tutorial, set the value to be Content.
- PageAdminName
- The identifier of the content page to which you assign the layout. Set a value for the column when the value for the PageGroup is set to be SampleShoppingCartDetailPage. Otherwise, leave the value for the column empty.
- Identifier
- The identifier of the category or catalog entry to which you want to assign the layout. Set a value for the column when the value for the PageGroup is set to be Category or CatalogEntry. Otherwise, leave the value for the column empty. For the tutorial, a value is not set.
- Delete
- A flag that indicates whether to delete the row for the layout assignment from the database. Specify 1 to delete the row.
For more information about completing your layoutAssignment.csv input CSV file, see layoutAssignment input file. -
Add business object configuration files for loading your new input files. Business object
configuration files define how to load data into the database. In the file, the implementation
classes that specify the Data Reader, Business Object Builder, and Business Object Mediator
components are included. By default, sample business object configuration files are provided for
loading widget, template, and layout information with the Data Load utility.
You can copy and use the sample business object configuration files to load your new input CSV files.
-
Create a data load order configuration file for the Data Load utility to use to load your page
and layout assignment information. The load order configuration file controls the order that the
Data Load utility loads data. The file includes pointers to the data load environment configuration
file, business object configuration file, and input CSV files.
-
Run the Data Load utility to load your layout, page, and layout assignment information.