/// <summary> /// Get collection of allowed (supported) message tokens for campaigns /// </summary> /// <returns>Collection of allowed (supported) message tokens for campaigns</returns> public virtual IEnumerable <string> GetListOfCampaignAllowedTokens() { var additionTokens = new CampaignAdditionTokensAddedEvent(); _eventPublisher.Publish(additionTokens); var allowedTokens = GetListOfAllowedTokens(new[] { TokenGroupNames.StoreTokens, TokenGroupNames.SubscriptionTokens }).ToList(); allowedTokens.AddRange(additionTokens.AdditionTokens); return(allowedTokens.Distinct()); }
/// <summary> /// Gets list of allowed (supported) message tokens for campaigns /// </summary> /// <returns>List of allowed (supported) message tokens for campaigns</returns> public virtual string[] GetListOfCampaignAllowedTokens() { var additionTokens = new CampaignAdditionTokensAddedEvent(); _eventPublisher.Publish(additionTokens); var allowedTokens = new List<string> { "%Store.Name%", "%Store.URL%", "%Store.Email%", "%Store.CompanyName%", "%Store.CompanyAddress%", "%Store.CompanyPhoneNumber%", "%Store.CompanyVat%", "%NewsLetterSubscription.Email%", "%NewsLetterSubscription.ActivationUrl%", "%NewsLetterSubscription.DeactivationUrl%", "%Facebook.URL%", "%Twitter.URL%", "%YouTube.URL%", "%GooglePlus.URL%" }; allowedTokens.AddRange(additionTokens.AdditionTokens); return allowedTokens.Distinct().ToArray(); }