/// <summary> /// Gets the Friendly Url /// </summary> /// <param name="dataItem">The data item.</param> /// <returns>Shopping cart item friendly url.</returns> protected string ShoppingCartLineFriendlyUrl(object dataItem) { ShoppingCartLine shoppingCartLine = dataItem as ShoppingCartLine; if (shoppingCartLine == null) { Log.Warn("Product line is null.", this); return("-"); } return(AnalyticsUtil.AddFollowListToQueryString(shoppingCartLine.FriendlyUrl, "ShoppingCartSpot")); }
/// <summary> /// Gets the Friendly Url /// </summary> /// <param name="dataItem"> /// The data item. /// </param> /// <returns> /// Shopping cart item friendly url. /// </returns> protected string ShoppingCartLineFriendlyUrl(object dataItem) { string friendlyUrl; if (this.DisplayMode == OrderDisplayMode.ShoppingCart) { ShoppingCartLine shoppingCartItem = (ShoppingCartLine)dataItem; friendlyUrl = shoppingCartItem.FriendlyUrl; } else { OrderLine orderLine = (OrderLine)dataItem; friendlyUrl = orderLine.FriendlyUrl; } return(AnalyticsUtil.AddFollowListToQueryString(friendlyUrl, this.DisplayMode.ToString())); }