Jump to content

daniels

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

41 Excellent

About daniels

  • Rank
    Jr. Member
  • Birthday November 2

Profile Information

  • Gender
    Male
  • Location
    Vienna, Austria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey @horst, @3fingers, I'm very sorry for the late response. I finally found some time to look into this. - @horst at the beginning, you mentioned a 401 error. I think this could be caused by a wrong audience id. But seems like this was no problem later? - Regarding 404: you get a 404 for every new user, because the "getStatus" method simply can't find a status for that user. This is absolutely correct behaviour and the check itself is suggested by the API documentation. I guess it is not a good idea to log this as a warning, as it is part of the normal process. I removed that. - @3fingers do you have double opt-in enabled or disabled? there was an extra 'if' on line 55 that has caused problems with resubscription when double opt-in was disabled. This should be fixed in 0.0.5. Thanks to jliebermann for posting this issue on github. (Note, that after a 'resubscribe', the user has to confirm his email adress again and will disappear in your "contacts" list until he does that!) - @3fingers your solution with updating line 54 can not really work, because the $status you are checking is not the HTTP_STATUS. It is supposed to be the subscription status, and it will be false, when you (correctly) get a 404 during the API call. So there should never be a 404 in $status πŸ€”. Besides that, I changed the wording in the readme and comments from 'list' to 'audience', since this is the new wording by Mailchimp. Version 0.0.5 is live in a minute. Appreciate your feedback. Thanks a lot for posting your issues and for your patience! Trying to answer you faster next time. Let me know if you still have problems.
  2. Hey @horst, thanks for reaching out. I have to check the details, but just on first sight: I think error B is just because of a problem at A. Line 62 is not supposed to be executed for new user. I'm very sorry, but I won't be able to look into it before Friday/Saturday due to a business trip. I made a todo and will do some testing and refactoring when I'm back. Maybe a quick and dirty fix for you meanwhile: With an if, check If you get the 404 in line 62 (patch), and if yes, execute the post request which is supposed to be executed for new users: $response = $http->send($api, json_encode($param), 'POST');
  3. No worries πŸ™‚ I suggest testing the subscribe function in a normal doc with test data. If this works (which should :)) try to dump your real data wherever you want to implement the subscription. If you can var_dump the right data there, you should be able to perform the subscription there πŸ™‚ Let me know if you have questions regarding the module itself or run into errors there.
  4. Ok @MarcoPLY , I think I got your question completely wrong πŸ˜„ I leave my reply anyway if someone needs it one day... Have you tried to var_dump the subscriber? What do you get there? Is the $ before country_title intentional?
  5. Hey @MarcoPLY , not sure if I get it right, but do you want to add user to specific categories? In the API naming, groups are called 'interests'. You can add them as additional parameters as in the example below. To get the interest IDs is a little pain-in-the-ass but I'll try to guide you: 1. Go to https://api.mailchimp.com/playground/ and enter your API key. 2. Click on 'Lists' and choose 'interest-categories' from the 'Subcategories' of your related list. 3. Choose 'interest' from 'Subcategories' of your related interest category 4. Now you can click on each interest and you'll get the id which should be the ID that you have to use in the 'interests' part of the example below. Please let me know if this works for you! When I find some time, I'll add a way to get these ids in the module Settings in PW admin. Example from the docs: // Work with additional parameters (not merge_field values!) $mc->subscribe('john.doe@example.com', NULL, NULL, [ 'language' => 'en', // find language list here: https://kb.mailchimp.com/lists/manage-contacts/view-and-edit-contact-languages#Language-Codes 'vip' => true, // boolean vip status 'location' => [ // geo location based on lat/log coordinates 'latitude' => '48.8722344', 'longitude', => '2.7736192' ], 'interests' => [ // subscribe user to interest categories / groups based on group id '32fec3561e' => true, '63mel4395m' => false ] ]);
  6. Ok, thanks anyway. I think it might have something to do with is_file(). I have worked around it for now πŸ™‚
  7. @LostKobrakai thank you so much for your great driver, I use and love it for quite a while now. I just experienced something weird, and I'm not sure if it has to do something with valet and your driver: I'm in the need of accessing a non-processwire php file in the processwire root (e.g. domain.test/myfile.php). On my staging & live server, this works great – on my local dev environment (including valet and your driver), I land on the 404 processwire page. I tried a few things: On Staging (with valet): domain.test/myimage.png -> βœ”οΈ domain.test/custom/myimage.png -> βœ”οΈ domain.test/myfile.php -> ❌ domain.test/custom/myfile.php -> ❌ On Live Server (apache): domain.com/myimage.png -> βœ”οΈ domain.com/custom/myimage.png -> βœ”οΈ domain.com/myfile.php -> βœ”οΈ domain.com/custom/myfile.php -> βœ”οΈ Is it possible that it has something to do with valet and the driver? Or could there be other reasons? Best, Daniel
  8. Updated to version 0.0.4 - checkout the changelog . The Github user ml-s fixed a major issue, where you could not use a Mailchimp core function, the ADDRESS mergefield.
  9. I've just rolled out version 0.0.3 - checkout the changelog . You should be able to update without any changes in your code.
  10. Thanks for your effort @flydev, let me know if you need some updates in the SubscribeToMailchimp module. The module would not be what it is made for, if you cant use it with the loginregister or any other way a dev prefers. I just want it to stay lightweight and flexible.
  11. I've created an issue regarding features of MailChimp, that currently can't be used with the module. Also I'd like to make it more flexible, if Mailchimp roles out new stuff. My question to you: Do you currently use this MailChimp features or would like to have it in the module? - Groups (Interests) (Setup up - VIP - manually fill IP, Language and/or Location
  12. Thank you for the feedback @MarcoPLY I've not worked with loginRegister and hooks yet. If you or someone finds a solution, please share it in here πŸ™‚
  13. @horst this is awesome!! Thank you, I will totally merge it in. It looks really great and is super helpful. I didn't even know, that this is possible via the module settings πŸ˜ƒ I also had a look at the issue mentioned by @Mikel . To resubscribe users (and I think this is indispensable) I had to add a getStatus method and change how the subscription method works. Now if a user resubscribes, he will get the double-opt-in mail again. I made a PR for this too, maybe you can take a look. I will merge both PRs than to version 0.0.3 (and hopefully don't mess it up .... :D) later this week. https://github.com/danielstieber/SubscribeToMailchimp/pull/2
  14. Hey @Mikel, seams like with the original mailchimp subscribe forms, it is possible (and in my opinion it should be) to resubscribe. I will have a look on that! Thanks for the input. Meanwhile (e.g. for testing) you can use the delete method to completely delete and resubscribe a user. That is working for me with the current version.
  15. Oh, that is cool. Thank you for help and clarification @LostKobrakai
Γ—
Γ—
  • Create New...