HCL Commerce Enterprise

Enabling SEO with sales catalogs and extended sites

If the search engine optimization (SEO) feature is enabled, when you create a new extended sites store and sales catalog, you must also manually create a token to store the new URL keyword mapping for the SEO-friendly URL creation.

Every SEO-friendly URL uses a token that represents the combination of store and catalog in its construction.

Update the and tables with new tokens when you create the following stores or catalogs:

  • A new sales catalog in the extended sites catalog asset store and you want to use this sales catalog with the existing extended sites stores. A token is needed for new sales catalog plus existing extended site store
  • A new extended sites store with a catalog asset store that has existing sales catalogs. A token is required for the new extended sites store and the existing sales catalog combination
Important: Keep keywords unique between extended sites and any catalog asset store that they share.

Extended sites may use SEO keywords that were defined at either the extended site level or the catalog store level. For instance, consider two extended sites that both use the keyword 'coffee' for a category. One defines the keyword locally and the other looks up the definition in the category asset store, which applies 'coffee' to a different category. If the second extended site is accessed first, the SEO service will cache its version of 'coffee.' This definition of 'coffee' will be used in subsequent calls, including calls to the first extended site, until the cache is cleared.

Procedure

  1. Ensure that your SEOURL table has a Store/Catalog token entry for the master catalog.
    If the master catalog is missing, add the token to the and tables with these SQL statements:
    INSERT INTO seourl (seourl_id, tokenname, tokenvalue) values (<seourl_id>, 'StoreToken:CatalogToken', '<storeId>:<masterCatalogId>');
    INSERT INTO seourlkeyword (seourlkeyword_id, seourl_id, language_id, storeent_id, urlkeyword) values (<seourlkeyword_id>, <seourl_id>, <langId>, 0, '<urlkeyword>');
    For example:
    INSERT INTO seourl (seourl_id, tokenname, tokenvalue) values (-2000, 'StoreToken:CatalogToken', '11051:10001');
    INSERT INTO seourlkeyword (seourlkeyword_id, seourl_id, language_id, storeent_id, urlkeyword) values (-2000, -2000, -1, 0, 'Saturn IT Master');
    Note: For <storeid>, use the store id of your Extended Sites Catalog Asset Store. To find the store id, run the following SQL statement:
    select * from storeent;
  2. For each extended sites store, issue the following SQL statement. This statement adds a Store/Catalog token to the table.
    INSERT INTO seourl (seourl_id, tokenname, tokenvalue) values (<seourl_id>, 'StoreToken:CatalogToken', '<storeId>:<salesCatalogId>');
    For example:
    INSERT INTO seourl (seourl_id, tokenname, tokenvalue) values (201, 'StoreToken:CatalogToken', '11251:10401');
    Important:
    • Ensure that you use the token name StoreToken:CatalogToken
    • Ensure that the token values are <storeId>:<salesCatalogId>, where <storeId> is the store id of your extended site store.
  3. For each extended sites store, issue the following SQL statement. This statement adds a URL keyword to the table that represents both the store id and the catalog id:
    INSERT INTO seourlkeyword (seourlkeyword_id, seourl_id, language_id, storeent_id, urlkeyword) values (<seourlkeyword_id>, <seourl_id>, <langId>, 0, '<urlkeyword>');
    For example:
    INSERT INTO seourlkeyword (seourlkeyword_id, seourl_id, language_id, storeent_id, urlkeyword) values (201, 201, -1, 0, 'teststore');
    Note:
    • The store URL keyword must be set up for every sales catalog that is available for the store. If it is not setup, dynamic URLs are constructed when the store is viewed with that particular sales catalog. When you set up the URL keyword, ensure that you set the storeent_Id to '0'
    • Care must be taken in the table when stores use multiple languages. The URL keyword is looked up in the following manner:
      1. The language Id that is specified in the urlLangId parameter during construction.
      2. If the keyword does not exist for the urlLangId, then the store default language is looked up.
      3. Otherwise, by default, -1 is looked up.

      So, if your store supports multiple languages, be sure to maintain keywords in at least one of those three locales.

    • The SEOURL_ID can be reused for multiple SEOURLKEYWORDs (for different languages) in the same store, but do not reuse SEOURL_ID values across multiple stores.
  4. Repeat step 2 and step 3 for each additional extended sites store that you want SEO enabled.
  5. Refresh the SEOConfigurationRegistry.

Results

All extended sites stores now have SEO-friendly URLs.