WebSphere Commerce DeveloperFeature Pack 7 or later

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

  1. Prepare the input and configuration files that the Data Load utility requires to load the layout template subscription information.
    1. In a file manager utility, go to the temporary directory where you extracted the CommerceComposerStoreSupportTutorial.zip compressed file.
    2. 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.
    3. Go to the WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\template directory.
    4. Back up the registerWidgetdef.csv, slotDefinition.csv, subscribeWidgetdef.csv, and template.csv files that are within the template directory.
    5. Paste the copied files from the layout_templates directory into the template directory.
    6. Go to the WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer directory.
    7. 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.
  2. Run the Data Load utility to load the layout template subscription information.
    1. Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
    2. In a command-line utility, go to the WCDE_installdir\bin directory.
    3. 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

    4. 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.
  3. 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.
    1. Go to the WCDE_installdir\starterstores\ConsumerDirect directory.
    2. Copy the Aurora.sar archive.
    3. Add the copied archive into a temporary directory outside of the WebSphere Commerce directory structure, for instance, tempAuroraDir.
    4. Extract the contents of the Aurora.sar archive into this temporary directory.
  4. 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.
    1. Go to the tempAuroraDir\StoreAssetsDir directory, where tempAuroraDir is the temporary directory where you extracted the Aurora.sar archive.
    2. Copy the Container directory.
    3. Go to the workspace_dir\Stores\WebContent\Madisons\Container directory and add the copied directory.
Subscribe your store to the Commerce Composer widgets that are provided by WebSphere Commerce.
  1. Prepare the input files that the Data Load utility requires to load the widget subscription information.
    1. Go to the temporary directory where you extracted the CommerceComposerStoreSupportTutorial.zip compressed file.
    2. 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.
    3. Go to the WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\widget directory.
    4. Back up the subscribeWidgetdef.csv, and wc-dataload-widget.xml files that are within the widget directory.
    5. 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.
  2. Run the Data Load utility to load the widget subscription information.
    1. Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
    2. In a command-line utility, go to the WCDE_installdir\bin directory.
    3. 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

    4. 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 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.

  1. Prepare the input files that the Data Load utility requires to load the default layout information.
    1. Go to the temporary directory where you extracted the CommerceComposerStoreSupportTutorial.zip compressed file.
    2. 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.
    3. Go to the WCDE_installdir\components\foundation\samples\DataLoad\CommerceComposer\layout directory.
    4. Back up the layout.csv, layoutWidgetRelationship.csv, widgetnvp.csv, and wc-dataload-layout.xml files that are within the layout directory.
    5. 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.
  2. Run the Data Load utility to load the default layout information.
    1. Ensure that your WebSphere Commerce server is stopped before you run the Data Load utility.
    2. In a command-line utility, go to the WCDE_installdir\bin directory.
    3. 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

    4. 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.".