public static string FaqLink(this HtmlHelper html, string title = "") { return html.AssureHttpUrl(LinkGenerator.GenerateFAQLink()); }
public static string ContentPageLink(this HtmlHelper html, string pageName) { return html.AssureHttpUrl(LinkGenerator.GenerateLinkForNamedContentItem(pageName)); }
public static string ShoppingCartLink(this HtmlHelper html) { return html.AssureHttpUrl(LinkGenerator.GenerateShoppingCartLink()); }
public static string SearchActionLink(this HtmlHelper html) { return html.AssureHttpUrl(LinkGenerator.GenerateSearchActionLink()); }
/// <summary> /// Create a product detail link for the base product. /// </summary> /// <param name="html"></param> /// <param name="product">The product</param> /// <returns></returns> public static string BaseProductDetailLink(this HtmlHelper html, Product product) { return html.AssureHttpUrl(LinkGenerator.GenerateProductLink(product.Variations == null ? product.Id : product.Variations.Product.First().GetParentProductId())); }
/// <summary> /// Create a product detail link for a product in the shopping cart /// </summary> /// <param name="html"></param> /// <param name="product">A product in the shopping cart</param> /// <returns></returns> public static string BaseProductDetailLink(this HtmlHelper html, Jungo.Models.ShopperApi.Common.Product product) { return html.AssureHttpUrl(LinkGenerator.GenerateProductLink(product.Id)); }
/// <summary> /// Create a product detail link for the base product. /// </summary> /// <param name="html"></param> /// <param name="productId">The product ID.</param> /// <returns></returns> public static string BaseProductDetailLink(this HtmlHelper html, long productId) { var baseProductId = productId; try { var prod = CatalogApi.GetProductAsync(CatalogApi.GetProductUri(productId)).Result; if (prod != null && prod.Variations != null) baseProductId = prod.Variations.Product.First().GetParentProductId(); } catch (Exception) { } return html.AssureHttpUrl(LinkGenerator.GenerateProductLink(baseProductId)); }
/// <summary> /// Create a product detail link. /// </summary> /// <param name="html"></param> /// <param name="productId">The product ID.</param> /// <returns></returns> public static string ProductDetailLink(this HtmlHelper html, long? productId) { return html.AssureHttpUrl(LinkGenerator.GenerateProductLink(productId)); }
public static string CategoryPageLink(this HtmlHelper html, long? categoryId = null) { return html.AssureHttpUrl(LinkGenerator.GenerateCategoryLink(categoryId)); }