Introduced in Feature Pack 3

Registering new URL Object token keyword data and token usage into database schema

Introduced in Feature Pack 3 SEO URL keywords for each Recipe and Recipe Collection object are stored in the WebSphere Commerce database. While you can update URL keyword data by using the Catalogs tool in Management Center for static pages, categories and catalog entries, a similar tool is not available for recipe URLs. To define URL keyword data for recipes, manually load it into the database by using the massload utility.

Procedure

  1. Define an XML file for the new Tokens and Recipe pages Keyword that uses the idresgen utility, which resolves the seourl_id, tokenusgtype_id, seourlkeyword_id attributes. The values that are prefixed with @counter_ indicate that this attribute entry needs to be resolved with the KEYS table when run through the idresgen utility.
    1. Go to WCDE_installdir\components\foundation\xml
    2. Right click and create a new XML file called wcs.RecipeSEO.xml
    3. Open wcs.RecipeSEO.xml file for editing
    4. Add the following code snippet to the file. Edit the storeent_id and tokenvalue values in the code to the correct value for your store and recipes:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE import SYSTEM "wcs.dtd">
      <import>
      <!--TOKEN USAGES-->
      <seotokenusgtype
             TOKENUSGTYPE_ID="@counter_0000000114"
             TOKENUSGTYPE="RecipeSection"
      	   PRIMARYTOKEN="RecipeSectionToken"
      	   STOREENT_ID="10001"
             ISSTATIC="1">
      </seotokenusgtype>
      <seotokenusgtype
             TOKENUSGTYPE_ID="@counter_0000000115"
             TOKENUSGTYPE="RecipeCollection"
      	   PRIMARYTOKEN="RecipeCollectionToken"
      	   STOREENT_ID="10001"
             ISSTATIC="0">
      </seotokenusgtype>
      <seotokenusgtype
             TOKENUSGTYPE_ID="@counter_0000000116"
             TOKENUSGTYPE="Recipe"
      	   PRIMARYTOKEN="RecipeToken"
      	   STOREENT_ID="10001"
             ISSTATIC="0">
      </seotokenusgtype>
      
      <!--RECIPE SECTION-->
      <seourl
             SEOURL_ID="@counter_0000000117"
      	   TOKENNAME="RecipeSectionToken"
             TOKENVALUE="RecipeSectionToken">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000118"
      	   SEOURL_ID="@counter_0000000117"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Recipe"
      	   STATUS="1">
      </seourlkeyword>
      
      <!--RECIPE COLLECTIONS-->
      <seourl
             SEOURL_ID="@counter_0000000119"
      	   TOKENNAME="RecipeCollectionToken"
             TOKENVALUE="2001">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000120"
      	   SEOURL_ID="@counter_0000000119"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Western-Foods"
      	   STATUS="1">
      </seourlkeyword>
      <seourl
             SEOURL_ID="@counter_0000000121"
      	   TOKENNAME="RecipeCollectionToken"
             TOKENVALUE="2002">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000122"
      	   SEOURL_ID="@counter_0000000121"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Delicious-Foods"
      	   STATUS="1">
      </seourlkeyword>
      
      <!--RECIPE-->
      <seourl
             SEOURL_ID="@counter_0000000123"
      	   TOKENNAME="RecipeToken"
             TOKENVALUE="2001">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000124"
      	   SEOURL_ID="@counter_0000000123"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Penne-Pasta-Salad"
      	   STATUS="1">
      </seourlkeyword>
      <seourl
             SEOURL_ID="@counter_0000000125"
      	   TOKENNAME="RecipeToken"
             TOKENVALUE="2002">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000126"
      	   SEOURL_ID="@counter_0000000125"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Delicious-Grilled-Ham-and-Cheese-Sandwich"
      	   STATUS="1">
      </seourlkeyword>
      <seourl
             SEOURL_ID="@counter_0000000127"
      	   TOKENNAME="RecipeToken"
             TOKENVALUE="2003">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000128"
      	   SEOURL_ID="@counter_0000000127"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Blueberry-Muffins"
      	   STATUS="1">
      </seourlkeyword>
      <seourl
             SEOURL_ID="@counter_0000000129"
      	   TOKENNAME="RecipeToken"
             TOKENVALUE="2004">
      </seourl>
      <seourlkeyword
             SEOURLKEYWORD_ID="@counter_0000000130"
      	   SEOURL_ID="@counter_0000000129"
             LANGUAGE_ID="-1"
      	   STOREENT_ID="10001"
      	   URLKEYWORD="Rotisserie-Beef"
      	   STATUS="1">
      </seourlkeyword>
      </import>
  2. Append SEOURL=@SEOURL_ID:SEOURL_ID to IdResolveKeys.properties-ext.
    1. Go to workspace_dir\WC\properties
    2. Create a copy ofIdResolveKeys.properties and rename it IdResolveKeys.properties-ext.
    3. Open the file and add the following line to the end:
      SEOURL=@SEOURL_ID:SEOURL_ID
  3. Run the idresgen on the wcs.RecipeSEO.xml file. This utility creates an XML file where the IDs are resolved. Then, run the massload utility on the resolved XML file:
    1. Go to WCDE_installdir\bin
    2. If you are running Cloudscape database, ensure that WebSphere Application Server is stopped:
    3. Run the idresgen utility on the wcs.RecipeSEO.xml file
      idresgen <input xml filename> <output xml filename>
      For example:

      idresgen.cmd ..\components\foundation\xml\wcs.RecipeSEO.xml ..\components\foundation\xml\wcs.RecipeSEO_resolved.xml ..\workspace\WC\properties\IdResolveKeys.properties-ext

    Note: The wcs.dtd file needs to be located in the same folder as wcs.RecipeSEO.xml
  4. Insert the new Recipe Token usage and URL Keyword data into the SEOTOKENUSGTYPE, SEOURL, and SEOURLKEYWORD tables by running the massload utility on the resolved output XML file
    1. Go to WCDE_installdir\bin
    2. Run the massload utility on the wcs.RecipeSEO_resolved.xml resolved output XML file:
      massload <input xml filename>