Feature Pack 5 or later

Migrating SEO URLs to use the default catalog

If your site plans to set a default catalog, you must migrate any WebSphere Commerce Feature Pack 3 SEO URLs used by your site. Migrating your SEO URLS ensures the URLs can use the default catalog. To migrate the SEO URLs, you must run a migration script.

Before you begin

About this task

The migration script takes the URL keywords that currently map to your store master catalog and then maps the keywords to the default catalog. The migration script changes the catalog Id in the TOKENVALUE field of the SEOURL table to an empty string for your store. The empty string in the TOKENVALUE field indicates to WebSphere Commerce to retrieve the default catalog from the STOREDEFCAT table. This migration script calls an Ant task that loads the configuration files and the XSL template files. The Ant task then applies the transformations, and saves the data to the required database tables. Error conditions are written to standard output. With the URLs migrated, shoppers that visit your store are forwarded to the default catalog, not the store master catalog, unless another catalog is specified.

Note: To ensure your site URLs can use the default catalog, you must also remove any instance of hardcoded catalog IDs in your URLs. If your hardcoded catalog IDs are not removed, the site URLs still work, but the URLs do not forward your shoppers to the specified default catalog.

Adding the default catalog function to your site does not cause any performance issues. It adds only a single SOA service that is called by the RuntimeServletFilter. This default catalog service retrieves the default catalog information from the STOREDEFCAT database table and an internal cache eliminates database reads with every service request. This cache can be shared across a clustered environment and when the default catalog updates, this cache is invalidated.

To run the migration script, perform the following steps:

Procedure

  1. Stop the WebSphere Commerce Server.
  2. SolarisLinuxAIXlog on as the WebSphere Commerce non-root user.
  3. Run the default catalog migration utility. Ensure that you specify the Id for the store you want to migrate, or an argument to migrate all of your stores.
    1. WebSphere Commerce DeveloperRun the migration script with the following command:
      WCDE_installdir/bin/migrateDefaultCatalog.bat storeId -verbose
      Where storeId is either the Id of the store you want to migrate or the word ALL to migrate all stores for your site.
      -verbose
      (Optional) Indicates that you want the full log detail level.
      All logging data is sent to the WCDE_installdir/logs/migrateDefaultCatalog.log file.
    2. WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalRun the migration script with the following command:
      • WindowsWC_installdir/bin/config_ant.bat -buildfile WC_installdir/components/foundation/migration/optional/components/foundation/subcomponents/catalog/config/DefaultCatalogMigration.xml -DinstanceName=instance_name -DstoreID=storeId
      • SolarisLinuxAIXWC_installdir/bin/config_ant.sh -buildfile WC_installdir/components/foundation/migration/optional/components/foundation/subcomponents/catalog/config/DefaultCatalogMigration.xml -DinstanceName=instance_name -DstoreID=storeId
      -buildfile
      (Required) Specifies the build file to use for the migration. This parameter must be followed by the path to the migration build file as shown.
      -DinstanceName
      (Required) Specifies the instance that you want to migrate. When you are using this parameter, replace instance_name with the name of the WebSphere Commerce instance for which you are migrating the SEO URLs for default catalog.
      -DstoreID
      (Required) Specifies the Id of the store to migrate or the word ALL to migrate all stores.
      -DcurrentPropFile
      (Optional) Specifies the full path and name of the database properties file. The database properties file is used when a database, other than the one specified in the instance.xml file, is to be updated. This file takes the same format as the createInstance.properties file found under the WC_installdir/instances/instance_name/properties directory. The database section in the properties file is used to acquire the parameters that are required for the migration utility.
      -logfile
      (Optional) Specifies the location of a log file. When you are using this parameter, specify the fully qualified path and file name of a file to contain logging information. If you do not specify this parameter, then logging information is displayed in the console.
      -verbose
      (Optional) Indicates that you want the full log detail level.