Loading Commerce Composer assets for your Deprecated featureMadisons store
In this lesson, you use the Data Load utility to load Commerce Composer widget and layout template data into your database and subscribe your store to these assets. By subscribing your store to the layout templates and widgets, business users can use the layout templates and widgets to design store pages.
Procedure
- 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 CommerceComposerStoreSupportTutorial.zip compressed file.
- In the source\dataload\layout_template 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 tool.
- slotDefinition.csv
- The Data Load utility uses this CSV input file to load information that the Commerce Composer tool requires to render the wireframe that represents the template in the user interface.
- subscribeWidgetdef.csv
- The Data Load utility uses this CSV input file to subscribe one or more stores to the widget or container.
- 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 tool.
- 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. Your updated configuration file can resemble the following code:
<_config:BusinessContext storeIdentifier="Madisons" languageId="-1" catalogIdentifier="Madisons"> </_config:BusinessContext> <!-- database setting for derby in Toolkit --> <_config:Database type="derby" name="..\db\mall" schema="APP"/>
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 Feature Pack 7 Aurora starter
store archive into a temporary directory. To enable your store to
use the Commerce Composer tool,
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 into
the Madisons store directory structure.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.
- 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 workspace_dir\Stores\WebContent\Madisons\Container directory and add the copied directory.
- 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 CommerceComposerStoreSupportTutorial.zip compressed file.
-
In the source\dataload\layout_default directory,
copy the following files:
- SubscribeWidgetdef.csv
- The Data Load utility uses the SubscribeWidgetdef.csv input file to subscribe your store to use the Commerce Composer widgets that are provided with WebSphere Commerce.
- wc-dataload-widget.xml
- The wc-dataload-widget.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 subscription information.
- 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.".
As an example for defining default layouts for your store, the following steps copy the default layouts that are provided for the Feature Pack 7 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 CommerceComposerStoreSupportTutorial.zip compressed file.
-
In the source\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.
- layoutWidgetRelationship.csv
- The Data Load utility uses this CSV input file to add a container and widgets to a layout, default layout, or template.
- 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.
- 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.".