Introduced in Feature Pack 3

Migrating search engine optimization for WebSphere Commerce Version 7 Feature Pack 3 or later

You can migrate your store to the new search engine optimization feature for WebSphere Commerce Version 7 Feature Pack 3 or later. This feature creates shorter and easier to understand URLs to improve searches for your store. You must perform some additional configuration tasks to ensure that your store supports search engine optimization.

Before you begin

Procedure

Enabling SEO-friendly URLs for your category and catalog entry items.
  1. Define your URL patterns for all pages that you want SEO-friendly URLs. See Constructing SEO-friendly URLs by using pattern files. As a starting point, you can take the pattern files from the latest starter store archive and modify the pattern files to suit. The pattern files are in the following store archive:
    Feature Pack 4Feature Pack 3
    • SolarisLinuxAIXWindowsWC_installdir\instances\instancename\starterstores\ConsumerDirect\Madisons-FEP.sar
    • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\Madisons-FEP.sar
    Feature Pack 5 or later
    • SolarisLinuxAIXWindowsWC_installdir\instances\instancename\starterstores\ConsumerDirect\Aurora.sar
    • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\Aurora.sar
    1. Extract the pattern files that you want to use:
      • seourlpatterns.xml for all static pages
        Note: It is mandatory to add seourlpatterns.xml file in your configuration. You must add seourlpatterns.xml file regardless of whether you use the static pages in your store.
      • seourlpatterns-category.xmlfor categories
      • seourlpatterns-product.xml for products
      • seourlpatterns-search.xml for search landing pages
    2. Place the pattern files in this directory:
      • SolarisLinuxAIXWindowsWC_eardir/Stores.war/WEB-INF/xml/seo/stores/storedirectory
      • WebSphere Commerce DeveloperWCDE_eardir/workspace/Stores/WebContent/WEB-INF/xml/seo/stores/storedirectory
    3. Optional: If your store uses an extended sites store model, place the files in the directory for both your extended sites store storedirectory and your storefront asset store directory:
      • SolarisLinuxAIXWindowsWC_eardir/Stores.war/WEB-INF/xml/seo/stores/storefrontassetstoredirectory
      • WebSphere Commerce DeveloperWCDE_eardir/workspace/Stores/WebContent/WEB-INF/xml/seo/stores/storefrontassetstoredirectory
    After the pattern files are in place, the SEO feature is enabled in your store. This feature enables the search engine optimization tab in Management Center for catalog entries and categories.
  2. Remove the .reload file from your store directory to prevent your pattern files from reloading during migration and deployment. Navigate to the following directory and remove the .reload file:

    Stores/WebContent/WEB-INF/xml/stores/seo/stores/storedirectory

    The .reload file is a development configuration. Remove this file when the SEO files to production since it causes the files to be read from the file system periodically.
  3. Run the seourlkeywordgen utility. When you are installing the search engine optimization feature for the first time, WebSphere Commerce needs SEO keywords for the product and category pages of the store. WebSphere Commerce uses these keywords to create shorter SEO friendly URLs. The seourlkeywordgen utility creates these SEO keywords based on the object names.
  4. Define token usage types for the new URL patterns:
    insert into seotokenusgtype values (-10000,'Language','LanguageToken',0,0,1);
    insert into seotokenusgtype values (-10001,'Store','StoreToken:CatalogToken',0,0,1);
    insert into seotokenusgtype values (-10002,'CatalogEntry','ProductToken',0,0,1);
    insert into seotokenusgtype values (-10003,'CatalogGroup','CategoryToken',0,0,1);
    insert into seotokenusgtype values (-10004,'Search','SearchTermToken',0,0,1);
    Note: Token usage types can be defined at different store levels:
    • Default store (applicable to all stores)
    • Storefront asset store (applicable to itself and all extended sites that are related to it with view relationship)
    • Extended site (applicable to only itself)
    • Stand-alone store (applicable to itself)
  5. Create the url keyword that represents both the store id and catalog id
    insert into seourl (seourl_id, tokenname, tokenvalue) values (-1000, 'StoreToken:CatalogToken', 'storeId:catalogId');  
    
    -- keyword the keyword that represents the store id and catalog id in URLs, i.e. madisons
    insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id, language_id, urlkeyword, status)  values(-1000, -1000, 0, -1, 'keyword', 1);   
Enable SEO friendly URLs for your static pages:
  1. Create token usage types for your static pages, such as the home and contact us pages.
    insert into seotokenusgtype values (-10005,'Home','HomeToken',10001,1,1);
    insert into seotokenusgtype values (-10006,'Help','ContactToken',10001,1,1);
    insert into seotokenusgtype values (-10007,'Sitemap','SitemapToken',10001,1,1);
    insert into seotokenusgtype values (-10008,'Privacy','PrivacyToken',10001,1,1);
    Note: Static pages in an extended site store must inherit the relationships from its asset store. Therefore, set the SEOTOKENUSGTYPE.STOREENT_ID to the 'assetstore_storeent_id'.
  2. Refresh the SEOConfigurationRegistry after any changes as the token usages for all stores are cached.
  3. Create the tokens for your static pages:
    insert into seourl (seourl_id, tokenname, tokenvalue) values (-1001, 'PrivacyToken', 'PrivacyToken');
    insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id, language_id, urlkeyword, status)  values(-1001, -1001, 10001, -1, 'privacy-policy', 1); 
    
    insert into seourl (seourl_id, tokenname, tokenvalue) values (-1002, 'ContactToken', 'ContactToken');
    insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id, language_id, urlkeyword, status)  values(-1002, -1002, 10001, -1, 'help-contact-us', 1); 
    
    insert into seourl (seourl_id, tokenname, tokenvalue) values (-1003, 'SitemapToken', 'SitemapToken');
    insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id, language_id, urlkeyword, status)  values(-1003, -1003, 10001, -1, 'sitemap', 1); 
    
    insert into seourl (seourl_id, tokenname, tokenvalue) values (-1004, 'HomeToken', 'HomeToken');
    insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id, language_id, urlkeyword, status)  values(-1004, -1004, 10001, -1, 'home', 1); 
  4. Optional: Add the Search Engine Optimization tab to the Store Management tool for your store. If you do not add the tab to the Store Management tool, business users are not able to change the Search Engine Optimization URLs for static pages with Management Center.
    1. Locate the StoreFlexFlowPropertiesView.def file:
      If this file does not display in your file system, the store migration process might not be complete. By default, the StoreFlexFlowPropertiesView.def file does not exist. The file generates when the store functions and store style is migrated from WebSphere Commerce Accelerator. For more information about the migration, see Overview of migrating store functions and store style from WebSphere Commerce Accelerator to Management Center Version 7 Feature Pack 2.
      • SolarisLinuxAIXWindowsWC_eardir\LOBTools.war\config\commerce\store\propertiesViews\storedirectory\StoreFlexFlowPropertiesView.def
      • WebSphere Commerce DeveloperWCDE_installdirworkspace\LOBTools\WebContent\config\commerce\store\propertiesViews\storedirectory\StoreFlexFlowPropertiesView.def
      Search for
      			<PropertyTabPane name="generalTab" text="${stoStoreResources.generalTabTitle}">
      				<PropertyPane baseDefinitionName="stoStorePropertiesPane"/>
      			</PropertyTabPane>
      	
      And add the following code after the previous section:
      <PropertyTabPane name="searchEngineOptimizationTab" text="${stoStoreResources.seoTabTitle}">
      				<EnablementCondition conditionId="seoEnabledCondition" enablementValue="true" objectPath="StoreSEO" propertyName="isEnabled"/> 
      				<PropertyPane baseDefinitionName="stoSearchEngineOptimizationPane"/>
      			</PropertyTabPane>
    2. Search for the ObjectProperties tag.
      <ObjectProperties definitionName="stoStoreProperties

      Add the following code to the objectProperties tag that corresponds to your storeId:

      componentObjectNames="selectedStaticPage"
      The result resembles the following code:
      <ObjectProperties definitionName="stoStoreProperties_10001" componentObjectNames="selectedStaticPage">
  5. Restart the WebSphere Commerce server.
  6. Modify your JSP files that use the wcf:url tag. If you modify these files it creates links for products, categories, and static pages to use the patterns that you defined in step 2. An extra patternName attribute must be added to the affected wcf:url tags.
    For example.
    <wcf:url patternName="CategoryURL" var="categorydisplayURL" value="CategoryDisplay">  (patternName="CategoryURL" is highlighted)
    	<wcf:param name="categoryId" value="10002" />
    	<wcf:param name="storeId" value="10001" />
    	<wcf:param name="langId" value="-1" />
    </wcf:url>
Enable title and meta description data for SEO:
  1. Enable the SEO title and meta description information.
  2. Restart the WebSphere Commerce Server.