public string CodesToProducts(string codes)
        {
            var productList = codes
                              .Split(",", StringSplitOptions.None)
                              .Select(code => AttributeHelper.CreateKey(code, _siteContext.LanguageName));
            var products = string.Join(",", productList);

            return(products);
        }
Beispiel #2
0
 /// <summary>
 /// Gets an eSales product key from an EPiServer id.
 /// </summary>
 /// <param name="entry"></param>
 /// <returns></returns>
 public static string ProductKey(Entry entry)
 {
     return(entry == null
                ? string.Empty
                : AttributeHelper.CreateKey(AppConfig.UseCodeAsKey ? entry.ID : entry.CatalogEntryId.ToString(CultureInfo.InvariantCulture), GetUserLang()));
 }