/// <summary> /// Builds the product URL. /// </summary> /// <param name="catalogItem">The catalog item.</param> /// <param name="productItem">The product item.</param> /// <returns>The product URL.</returns> public override UrlString GetProductUrl(Item catalogItem, Item productItem) { Assert.ArgumentNotNull(catalogItem, "catalogItem"); Assert.ArgumentNotNull(productItem, "productItem"); UrlOptions urlOptions = new UrlOptions { SiteResolving = true, ShortenUrls = false, UseDisplayName = false, AlwaysIncludeServerUrl = false, AddAspxExtension = false, EncodeNames = false, LanguageEmbedding = LanguageEmbedding.Always, }; UrlString url = new UrlString(LinkManager.GetItemUrl(catalogItem, urlOptions)); url.Path = string.Concat(IO.FileUtil.MakePath(url.Path, HttpUtility.UrlPathEncode(productItem["Product Code"]), '/'), ".aspx"); return url; }
/// <summary> /// Builds the product URL. /// </summary> /// <param name="catalogItem">The catalog item.</param> /// <param name="productItem">The product item.</param> /// <returns>The product URL.</returns> public abstract UrlString GetProductUrl(Item catalogItem, Item productItem);