×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Auto subscribe to newsletter list

Auto subscribe to newsletter list 8 years 8 months ago #31910

  • Tim Cousins
  • Tim Cousins's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
First off - EXCELLENT component - simple to set up, neat interface and logical methods ... however ...
I've trawled the forum for the answer and can't find it for looking (and it's late and I've been trying to solve this problem for days now ! Grrr !)

The Problem
I (like many others it would seem) want to be able to automatically subscribe a user to a list. I am fully aware of the double opt in process and anti spam laws and am not trying to circumvent these. I have provided other means for ensuring that only willing users will be subscribed to the MailChimp list.

I want to improve the user experience such that when they finally get to enter their email address (after several confirmation steps) they are fully aware they're being subscribed to a list but do not have to either: further activate their account (if I set the "New User Account Activation" to SELF) ; or, logon to their profile to update the "newsletter" checkbox (if I set the "New User Account Activation" to NONE)

The Scenario
I have successfully installed and tested the CMC component so I know it's working as advertised, just not how I want it to.
I am using a custom subscription form (Chronoforms5) in a popup window but do not know how to then add the users to the relevant list.
Ideally, I want to leave "new User Account Activation" to NONE, but want to add them to a specific list at time of registration.

Questions about the CMC component
  1. Am I correct in thinking that the "newsletter" tick box on the user profile (Backend) is simply a binary display of whether the users email exists in the #__cmc_users table ?
  2. Does the #__cmc_register table ever get populated ?
  3. How can I automate the process of adding the user to a list through calls to the CMC component ?
  4. Is there a call I can make (i.e. a formed URL to the CMC component) which replicates the action of "ticking the newsletter checkbox" in the user profile ?
I can assure you I have read nearly every post on the forum and read through the CMC documentation to no avail, so please accept my apologies if this information exists somewhere already - if it does a link to the relevant entry would be useful

Your help would be gratefully appreciated and would save me going prematurely insane ...

Thanks,
Tim

Auto subscribe to newsletter list 8 years 7 months ago #31974

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Well, I wanted to introduce an option for the double opt-in in the last release, but I didn't come to it. If you want you can hack the code
D:\Development\Joomla\compojoom\com_cmc\source\administrator\components\com_cmc\libraries\mailchimp\MCAPI.class.php

line 1575 looks likke this:
$params["double_optin"] = $double_optin;

change it to:
$params["double_optin"] = false;

since our code calls this function, by hardcoding the double_optin to false you would always subscribe without sending a confirmation mail to the user. (I think, I haven't tested it)

The downside is that you would have to do the same change until we provide a switch for this.

About the questions.
1. what do you mean? Actually yes, the thickbox in the backend should tell you if the user has subscribed or not. If you have any additional fields in your form, they should also be shown on the users profile
2. It gets populated when a user registers and we make sure to clean it up after he has subscribed to the newsletter.
3. No idea what you mean here.
4. Not a single line.

Regards,
Daniel

Auto subscribe to newsletter list 8 years 7 months ago #31984

  • Tim Cousins
  • Tim Cousins's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Daniel,
Thanks for the reply - hope you've had a nice break !
I've amended the code MCAPI.class.php as you describe, however, it's not quite what I'm after ...

The MCAPI.class.php file is used to sync the Joomla users to the mailchimp list ... but this code is already working fine without the code change mentioned in your post.
I want to manually set the "Newsletter" flag on the Joomla user profile at the time when the user first registers on my site.

Because I'm using a custom registration module (rather than the standard Joomla user registration) I can't use your excellent registration component, so have to find a workaround.

What I would like to do is either:
a) "Hack the code" to make the function call that equates to the "ticking the newsletter checkbox in the Joomla registration profile module", or ...
b) Manually insert a checkbox in my custom registration module so that the "newsletter" checkbox is automatically checked when the user is registered.

What I would like to know is:
- Where in your code is the step that recognises that the "newsletter" checkbox is "ticked" by the user when they edit their joomla user profile?

Thanks again,
Tim
  • Page:
  • 1
Time to create page: 0.114 seconds