Use the Data Load utility to
enable your store to use the Commerce Composer layout templates and widgets that are
available with WebSphere Commerce. When you complete updating your store pages to support the
use of the Commerce Composer, business users can use these templates and widgets to
design your store pages.
About this task
When you install and enable WebSphere Commerce, various
Commerce Composer widgets and layout templates can be available for use in composing
store pages. These assets are registered with the Commerce Composer framework during
the enablement process. However, to use these Commerce Composer assets
in your store, you must subscribe your store to these assets. By subscribing to these assets, the
assets become available to business users in the Commerce Composer for your store. If
you do not subscribe your store to any assets, business users cannot select any layout templates or
widgets when they are creating a layout.
To subscribe your store to Commerce Composer assets, you must use the Data Load utility to load the subscription
information. By default, the WebSphere Commerce Developer includes sample data load configuration
files that you can use to load the subscription information. To use these configuration files, you
must copy the CSV input files that are provided in the
CommerceComposerStarterStoreSupport.zip compressed file that you previously
extracted into the Data Load utility
samples directory
Procedure
Define the Commerce Composer layout templates for
your store.As an example for defining templates for your store, the following steps copy the
layout templates that are provided for the WebSphere Commerce Aurora starter
store.
-
Prepare the input and configuration files that the Data Load utility requires to load the layout
template subscription information.
-
In a file manager utility, go to the temporary directory where you extracted the
CommerceComposerStarterStoreSupport.zip compressed file.
-
In the dataload\layout_templates directory, copy the following
files:
- registerWidgetdef.csv
- The Data Load utility uses this CSV
input file to register a new widget or container for use in the Commerce Composer.
For more information about the type of information in this file, see registerWidgetdef input file.
- slotDefinition.csv
- The Data Load utility uses this CSV
input file to load information that the Commerce Composer requires to render the
wireframe that represents the template in the user interface. For more information about the type of
information in this file, see slotDefinition input file.
- subscribeWidgetdef.csv
- The Data Load utility uses this CSV
input file to subscribe one or more stores to the widget or container. For more information about
the type of information in this file, see subscribeWidgetdef input file.
- template.csv
- The Data Load utility uses this CSV
input file to load layout templates into a store so that they can be used in the Commerce Composer. For more information about the type of information in this file, see template input file.
-
Go to the
WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\template
directory.
-
Back up the registerWidgetdef.csv,
slotDefinition.csv, subscribeWidgetdef.csv, and
template.csv files that are within the template
directory.
-
Paste the copied files from the layout_templates directory into the
template directory.
-
Go to the
WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer
directory.
-
Open the wc-dataload-env.xml file for editing. This file is the sample
environment configuration file for the Data Load utility.
Update the file to meet your environment settings:
- In the
_config:BusinessContext
element, update the values for the
storeIdentifier
and catalogIdentifier
attributes to match your
environment settings.
- In the
_config:Database
element, update the values to
meet your WebSphere Commerce Developer.
You do not need to change the default values for the remaining environment settings.
You do not need to update the provided business object configuration files
or the wc-dataload-template.xml load order configuration file for loading
layout template information.
-
Run the Data Load utility to load
the layout template subscription information.
-
Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
-
In a command-line utility, go to the
WCDE_installdir\bin directory.
-
Run the following command to load the input CSV files to load the subscription
information:
dataload
../components/foundation/samples/DataLoad/CommerceComposer/template/wc-dataload-template.xml
-
Verify that the Data Load utility
loaded successfully by checking the log file for the utility. Ensure that the following statement
displays in the log file: "Load completed successfully with no errors.".
The wc-dataload.log log file for the Data Load utility is generated in the
WCDE_installdir\logs directory.
-
Add the Aurora starter store archive into a temporary directory. To enable your
store to use the Commerce Composer, you add files and code that is included in this
archive into files and directories within your store directory structure.
-
Go to the WCDE_installdir\starterstores\ConsumerDirect
directory.
-
Copy the Aurora.sar archive.
-
Add the copied archive into a temporary directory outside of the WebSphere Commerce
directory structure, for instance, tempAuroraDir.
-
Extract the contents of the Aurora.sar archive into this temporary
directory.
-
Copy the Aurora starter store container JSP files and Commerce Composer widget
directory structure into the directory structure for your store.
The Commerce Composer widgets that are available
with WebSphere Commerce requires these container JSP files and the directory structure to
function and display correctly on store pages. For more information, see
Commerce Composer widget architecture.
-
Go to the tempAuroraDir\StoreAssetsDir directory, where
tempAuroraDir is the temporary directory where you extracted the
Aurora.sar archive.
-
Copy the Container directory.
-
Go to the directory for your store and add the copied directory.
For example, your copied directory path can be
workspace_dir\Stores\WebContent\store\Container,
where store is the name of your store directory.
Subscribe your store to the Commerce Composer widgets
that are provided by WebSphere Commerce.
-
Prepare the input files that the Data Load utility requires to load the widget
subscription information.
-
Go to the temporary directory where you extracted the
CommerceComposerStarterStoreSupport.zip compressed file.
-
In the dataload\widgets directory, copy the following files:
-
Go to the
WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\widget
directory.
-
Back up the subscribeWidgetdef.csv, and
wc-dataload-widget.xml files that are within the widget
directory.
-
Paste the copied files from the dataload\widgets directory into the
widget directory.
You do not need to update any of the provided business object
configuration files or the further update the environment configuration file.
-
Run the Data Load utility to load
the widget subscription information.
-
Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
-
In a command-line utility, go to the
WCDE_installdir\bin directory.
-
Run the following command to load the input CSV files to load the subscription
information:
dataload
../components/foundation/samples/DataLoad/CommerceComposer/widget/wc-dataload-widget.xml
-
Verify that the Data Load utility
loaded successfully by checking the log file for the utility. Ensure that the following statement
displays in the log file: "Load completed successfully with no errors.".
Define the default page layouts for each store page group of
your store.
As an example for defining default layouts for your store, the following steps copy the default
layouts that are provided for the Aurora starter store.
By subscribing to these
layouts, when you create a store page, the new page uses the appropriate default layout to define
the content and display of the page. After you complete adding support for your store, you can
create and assign new default layouts for each page group.
-
Prepare the input files that the Data Load utility requires to load the default
layout information.
-
Go to the temporary directory where you extracted the
CommerceComposerStarterStoreSupport.zip compressed file.
-
In the dataload\layout_default directory, copy the following files:
- layout.csv
- The Data Load utility uses this CSV
input file to load layouts and default layouts into a store. For more information about the type of
information in this file, see layout input file.
- layoutWidgetRelationship.csv
- The Data Load utility uses this CSV
input file to add a container and widgets to a layout, default layout, or template. For more
information about the type of information in this file, see layoutWidgetRelationship input file
- widgetnvp.csv
- The Data Load utility uses this CSV
input file to set the properties of widgets that are added to a specific layout or template,
including a default layout. For more information about the type of information in this file, see
widgetnvp input file.
- wc-dataload-layout.xml
- The wc-dataload-layout.xml data load order configuration file defines the
environment configuration file, business object configuration file, and input file that the Data Load utility uses to load the default
layout information.
-
Go to the
WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\layout
directory.
-
Back up the layout.csv, layoutWidgetRelationship.csv,
widgetnvp.csv, and wc-dataload-layout.xml files that are
within the layout directory.
-
Paste the copied files from the dataload\layout_default directory into the
layout directory.
You do not need to update any of the provided business object
configuration files or the further update the environment configuration file.
-
Run the Data Load utility to load
the default layout information.
-
Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
-
In a command-line utility, go to the
WCDE_installdir\bin directory.
-
Run the following command to load the input CSV files to load the subscription
information:
dataload
../components/foundation/samples/DataLoad/CommerceComposer/layout/wc-dataload-layout.xml
-
Verify that the Data Load utility
loaded successfully by checking the log file for the utility. Ensure that the following statement
displays in the log file: "Load completed successfully with no errors.".
Verify that the Commerce Composer assets are
available for your store.
-
Open the Commerce Composer tool.
-
Select your store from the Store list.
-
Create a
layout for your store. Do not assign your layout to a page. You must update your store pages
before you can view the layout on a page in your store.
When you are creating your test layout, review the list of Commerce Composer
layout templates and widgets that are available for you to use for your layout. If the list of
templates and widgets includes all of the assets that you subscribed your store to, you successfully
loaded the Commerce Composer assets for your store.