コード例 #1
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 public static string FaqLink(this HtmlHelper html, string title = "")
 {
     return html.AssureHttpUrl(LinkGenerator.GenerateFAQLink());
 }
コード例 #2
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 public static string ContentPageLink(this HtmlHelper html, string pageName)
 {
     return html.AssureHttpUrl(LinkGenerator.GenerateLinkForNamedContentItem(pageName));
 }
コード例 #3
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 public static string ShoppingCartLink(this HtmlHelper html)
 {
     return html.AssureHttpUrl(LinkGenerator.GenerateShoppingCartLink());
 }
コード例 #4
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 public static string SearchActionLink(this HtmlHelper html)
 {
     return html.AssureHttpUrl(LinkGenerator.GenerateSearchActionLink());
 }
コード例 #5
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 /// <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()));
 }
コード例 #6
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 /// <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));
 }
コード例 #7
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 /// <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));
 }
コード例 #8
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 /// <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));
 }
コード例 #9
0
ファイル: Extensions.cs プロジェクト: grbbod/drconnect-jungo
 public static string CategoryPageLink(this HtmlHelper html, long? categoryId = null)
 {
     return html.AssureHttpUrl(LinkGenerator.GenerateCategoryLink(categoryId));
 }