Updating the view and pattern names in the wcf:url tags of the storefront JSPs

In this lesson, you update the SEO pattern names in the URL construction tags wcf:url for the smartphone and tablet starter stores to use the pattern names for the Aurora starter store as defined in the previous lesson. The corresponding hyperlinks on the corresponding storefront JSPs will reflect the new SEO URLs. For more information about SEO URL construction, see SEO-friendly URL construction overview.

About this task

In cases where a non-SEO URL is used, instead the view name itself is updated.
Note:
  • Feature Pack 3In Version 7 Feature Pack 3, SEO URLs are constructed using the pattern template definitions. Precedence is given to the patternName attribute over the value attribute.
  • Feature Pack 2WebSphere Commerce Version 7.0.0.0Feature Pack 1You must update the value attribute of the wcf:url tag accordingly.

Procedure

View and pattern updates to the smartphone starter store
  1. Update the patterns in the smartphone starter store CachedHeaderDisplay.jsp to HomePageURLWithLang.
    File Path File name
    Stores > WebContent > Aurora > mobile20 > include > styles > style1 > CachedHeaderDisplay.jsp
    1. In Enterprise Explorer, navigate to the file path in the table and open the JSP file. Switch to Source view.
    2. Search for wcf:url tags with patternName="m20HomeURLWLang". For each occurrence in the file, replace with patternName="HomePageURLWithLang".
    3. Search for wcf:url tags with patternName="m20TopCategoriesURL". For each occurrence in the file, replace with patternName="HomePageURLWithLang".
  2. Update the patterns in the smartphone starter store SubCategores.jsp file.
    File Path File name
    Stores > WebContent > Aurora > mobile20 > ShoppingArea > CatalogSection > CategorySubsection SubCategories.jsp
    1. In Enterprise Explorer, navigate to the file path in the table and open the file. Switch to Source view.
    2. Search for the line <c:set var="patternName" value="m20CategoryURLWPaging" />. Replace "m20CategoryURLWPaging" with "CategoryURLWPaging".
    3. Search for the line <c:set var="patternName" value="m20CategoryURLWParentCategory" />. Replace "m20CategoryURLWParentCategory" with "CategoryURLWParentCategory".
    4. Search for the line <c:set var="patternName" value="m20TopCategoryURLWPaging" />. Replace "m20TopCategoryURLWPaging" with "TopCategoryURLWPaging".
    5. Search for the line <c:set var="patternName" value="m20TopCategoryURL" />. Replace "m20TopCategoryURL" with "CanonicalCategoryURL".
    6. Search for tags with patternName="m20CategorySearchURL" and for each occurrence, replace with patternName="CanonicalCategoryURL".
    7. Save and close the file.
  3. Replace m20TopCategoryURL with CanonicalCategoryURL in the smartphone starter store TopCategoriesDisplay.jsp file.
    File Path File name
    Stores > WebContent > Aurora > mobile20 > ShoppingArea > CatalogSection > CategorySubsection TopCategoriesDisplay.jsp
    1. In Enterprise Explorer, navigate to the file path in the table and open the JSP files. Switch to Source view.
    2. Search for wcf:url tags with patternName="m20TopCategoryURL". For each occurrence in the file, replace with patternName="CanonicalCategoryURL".
    3. Save and close the file.
  4. Replace m20ProductURL with ProductURL in the JSP files that are listed in the following table.
    File Path File name
    Stores > WebContent > Aurora > mobile20 > ShoppingArea > CatalogSection > CatalogEntrySubsection ProductCompareResultGridDisplay.jsp
    Stores > WebContent > Aurora > mobile20 > ShoppingArea > CatalogSection > SearchSubsection SearchBasedNavigationCategories.jsp
    Stores > WebContent > Aurora > mobile20 > ShoppingArea > ShopcartSection OrderItemDisplay.jsp
    Stores > WebContent > Aurora> mobile20 > Snippets > Catalog > CatalogEntryDisplay CachedBundleDisplay.jsp
    CachedPackageDisplay.jsp
    Stores > WebContent > Aurora > mobile20 > Snippets > MultipleWishList WishListItems.jsp
    Stores > WebContent > Aurora> mobile20 > UserArea > AccountSection > ServiceSection > EFlyerSubsection MarkhamCentre.jsp
    MarkvilleMall.jsp
    Ontario.jsp
    WardenPlaza.jsp
    1. In Enterprise Explorer, navigate to the file paths in the table and open the files. Switch to Source view.
    2. Search for wcf:url tags with patternName="m20ProductURL". For each occurrence in the file, replace with patternName="ProductURL".
      Note: This tutorial uses the desktop SEO pattern with the corresponding parameters structure to minimize JSP changes. The desktop Aurora storefront JSP files contain additional logic to select the different pattern names when more category information is available.
    3. Save and close the file.
  5. Replace m20ProductDisplayView with ProductDisplay in the JSP file listed in the following table.
    File Path File name
    Stores > WebContent > Aurora > mobile20 > Snippets > Marketing > ESpot FeaturedProductsESpot.jsp
    1. In Enterprise Explorer, navigate to the file path in the table and open the file. Switch to Source view.
    2. Search for tags containing the term "m20ProductDisplayView". For each occurrence in the file, replace the term "m20ProductDisplayView" with "ProductDisplay".
    3. Save and close the file.
View and pattern updates to the tablet starter store
  1. Replace TabletHomeURL with HomePageURLWithLang in each of the JSP files that are listed in the following table.
    File Path File name
    Stores > Webcontent > Aurora > tablet index.jsp
    Stores > Webcontent > Aurora > tablet > include> styles > style1 CachedHeaderDisplay.jsp
    Stores > Webcontent > Aurora > tablet > ShoppingArea> CheckoutSection OrderConfirmation.jsp
    Stores > WebContent > Aurora > tablet > UserArea LanguageCurrencyDisplay.jsp
    1. In Enterprise Explorer, navigate to the file paths in the table and open the JSP files. Switch to Source view.
    2. Search for wcf:url tags with patternName="TabletHomeURL". For each occurrence in the file, replace with patternName="HomePageURLWithLang".
      Note: In the <wcf:url> tags, you might notice that in addition to the patternName attribute, the value attribute may contain a tablet-specific view name. This value is used if the SEO pattern is unavailable or if the SEO feature is not enabled. For this tutorial, it is not essential that these values be updated.
    3. Save and close the file.
  2. Replace TabletCategoryURLWParentCategory with CategoryURL in the JSP files that are listed in the following table and add an additional <wcf:param> for the top category.
    File Path File name
    Stores > WebContent > Aurora > tablet > Snippets > Catalog > CategoryDisplay CategoriesNavDisplay.jsp
    ProductsPopup.jspf
    1. In Enterprise Explorer, navigate to the file path in the table and open the files. Switch to Source view.
    2. Search for wcf:url tags with patternName="TabletCategoryURLWParentCategory". For each occurrence in the file, replace with patternName="CategoryURL".
    3. In each of the JSP files, locate the following code block:
      <wcf:url var="SubcategoryURL" patternName="CategoryURL" value="tCategoriesDisplayView">
          <wcf:param name="storeId" value="${storeId}"/>
          <wcf:param name="catalogId" value="${catalogId}"/>
      		 <wcf:param name="langId" value="${langId}"/>
      		 <wcf:param name="categoryId" value="${subcategory.categoryId}"/>
      		 <wcf:param name="parent_category_rn" value="${topCategory.categoryId}"/>
      </wcf:url>
    4. An additional parameter for the top category is required to generate the SEO URL using the CategoryURL pattern. Add the following <wcf:param> parameter to the <wcf:url> element:
      <wcf:param name="top_category" value="${topCategory.categoryId}"/>

      The updated code block should resemble the following code block:

      <wcf:url var="SubcategoryURL" patternName="CategoryURL" value="tCategoriesDisplayView">
          <wcf:param name="storeId" value="${storeId}"/>
          <wcf:param name="catalogId" value="${catalogId}"/>
          <wcf:param name="langId" value="${langId}"/>
          <wcf:param name="categoryId" value="${subcategory.categoryId}"/>
          <wcf:param name="top_category" value="${topCategory.categoryId}"/>
          <wcf:param name="parent_category_rn" value="${topCategory.categoryId}"/>
      </wcf:url>
    5. Save and close the file.
  3. Replace TabletCategoryURL with CanonicalCategoryURL in each of the JSP files that are listed in the following table.
    File Path File name
    Stores > WebContent > Aurora > tablet > Snippets > Catalog > CategoryDisplay CategoriesNavDisplay.jsp
    ProductsPopup.jspf
    Stores > WebContent > Aurora > tablet > Snippets> Marketing > ESpot CategoryRecommendation.jspf
    Stores > WebContent > Aurora > tablet > Snippets> ReusableObjects CategoriesNavDisplay.jsp
    Stores > WebContent > Aurora> tablet > Snippets > Search ActiveFacetDisplay.jspf
    CachedSuggestions.jsp
    CategoryFacetDisplay.jspf
    1. In Enterprise Explorer, navigate to the file paths in the table and open the JSP files. Switch to Source view.
    2. Search for wcf:url tags with patternName="TabletCategoryURL". For each occurrence in the file, replace with patternName="CanonicalCategoryURL".
    3. Save and close the file.
  4. Replace TabletProductURL with ProductURL in the JSP files that are listed in the following table.
    File Path File name
    Stores > WebContent > Aurora > tablet > ShoppingArea> CatalogSection > CatalogEntrySubsection ProductCompareResultGridDisplay.jsp
    Stores > WebContent > Aurora> tablet > Snippets > Catalog > CatalogEntryDisplay CatalogEntryQuickViewComponents.jspf
    CatalogEntryQuickViewDialogContents.jsp
    CatalogEntryThumbnailDisplay.jsp
    Stores > WebContent > Aurora > tablet > Snippets> Search CatalogEntryThumbnailDisplay.jsp
    1. In Enterprise Explorer, navigate to the file paths in the table and open the files. Switch to Source view.
    2. Search for wcf:url tags with patternName="TabletProductURL". For each occurrence in the file, replace with patternName="ProductURL".
    3. Save and close the file.