Jump to content

Work in progress modules Subscribers / WireMailChimp


benbyf
 Share

Recommended Posts

Thought I'd show some work in progress modules.

Subscribers https://github.com/benbyford/Subscribers

  • has functions for logging in new users,
  • added with new subscriber role
  • bulk export the subscriber users to comma delineated
  • SubscriberList (submodule)
    • module adds an admin page to view your subscribers and page through them, or export

WireMailChimp https://github.com/benbyford/WireMailChimp

(though I need to change the name on github)

Implements https://github.com/drewm/mailchimp-api

  • adds any user save to a mailchimp list
  • settings for API and List id
  • only adds users that have a checked email_subscribe field to true

 

  • Like 13
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Hi, Ben,

I just looked ino the WireMailChimp module: It does require the Subscribers module, doesn´t it?

For my needs I altered the part whre this module is loaded and the role "subscriber" is checked. (I just run a check against my own subscriptions field)

I will then allways get the same error message, no matter if subscribing or unsubscribing:
400: [EMAILADRESS] is already a list member. Use PUT to insert or update list members.

Did you already got it to work properly?

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

@Mikel nice implementation, no it doesn't need the subscriber module, just change the role to something that is present in your system - I chose subscriber as my role.

I added a checkbox to the user template and check against it when trigging the module. Soooo when the checkbox is false it sends their email to mailchimp and I change to true. now if it trys to check again the checkbox field will be true and it wont send to mailchimp.

Link to comment
Share on other sites

  • 3 weeks later...

im looking to revamp the Subscribers module soon and create a site to show its implememtation - I was thinking a simple job listing CV site unless someone could think of anything better?

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Hi. I'm trying to install the WireMailChimp module, but I'm getting an error when I install:

"parse error (line 73 of /Users/paul/Sites/pw-projects/site/modules/WireMailChimp/WireMailChimp.module)"

I'm using PW 2.7.2. Any ideas why?

Link to comment
Share on other sites

Hi @benbyf. Well, I first got the error when I tried to install the module, so I never got far enough to enter a List ID (or any other settings). I then commented out lines 73-76 (and 82-85 when I got the same error) and was able to install the module and insert API and List ID. But when I uncommented the lines, I get the same error.

Link to comment
Share on other sites

Ok, I got it. It turns out it's because this particular site is still using php v5.3.x which doesn't like the "Array Initialization Construct: []" I've worked around it by using "array(" instead:

                    $result = $MailChimp->post("lists/$list_id/members", 
                        array(
                        'email_address' => $page->email,
                        'status'        => 'subscribed',
                    ));

Cheers,
Paul

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
3 minutes ago, alexmercenary said:

@benbyf I'm using WireMailChimp and using it in conjunction with Login/Register to create accounts on the front end.

Cool. I think it only signs up users with role "subscriber" set, or a different role setup in my subscriber module (not required). So you can change this in the code, or add the role when they register.

They also must have a vaild email, and mailchimp API keys and list name setup in the module config

Link to comment
Share on other sites

Hmm yeah I did that. I changed it in the module to login-register and set the api key and list id but it doesn't seem to add the users. I've also added a checkbox called email_subscribe. Strange.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...