Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • crono 58 posts 129 karma points
    May 20, 2015 @ 10:55
    crono
    0

    Displaying list count in custom SubscriptionProvider

    Hi Marcus,

    We've just implemented a custom SubscriptionProvider that fetches the lists from WebCRM, and we were wondering how to display the number of subscribers in those lists, just like the builtin SubscriptionProviders, ie. "Name of list (1000)".

    Does this only work for lists that exist in the db, or have we missed something somewhere?

  • keilo 568 posts 1023 karma points
    May 20, 2015 @ 11:04
    keilo
    0

    I have enquired on the same need at the time, would like to know how to go about it in the latest updated version.

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    May 20, 2015 @ 11:16
    Markus Johansson
    101

    Hi!

    It's really easy - just implement the ICountable-interface in your subscription provider (NewsletterStudio.Bll.Providers.ICountable).

    Like this:

    public class YourCustomSubscriptionProvider : SubscriptionProviderBase, ICountable 
    {
           public int GetCount(string listItemValue)
           {
                    // the value of listItemValue is the same as the parameter that is passed to the GetSubscribersForSendOut-method.
           }

     

  • crono 58 posts 129 karma points
    May 20, 2015 @ 11:21
    crono
    0

    Aha, that is awesome!

    Thank you for the swift reply Marcus :)

Please Sign in or register to post replies

Write your reply to:

Draft