Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Sending Custom Fields to Aweber
Tagged: aweber, Aweber API, custom fields
- This topic has 14 replies, 5 voices, and was last updated 10 years, 8 months ago by admin.
-
AuthorPosts
-
June 2, 2012 at 12:26 am #6484kc0bukMember
Hi Guys,
Sent this question in via email already, however, I’m going to post here so everyone can benefit from the reply. I haven’t been able to find any info on this topic anywhere in the forum. Sorry about the double post.
I am trying to automatically add the Affiliate ID (user_name) to an affiliate’s record in Aweber when the sign up as an affiliate. I have tried modifying the API code and the email parser code in wp_aff_auto_responder_handler.php, but the custom field isn’t being passed to Aweber. Hopefully someone here can point out the error in my code.
After creating the custom field Affiliate ID in Aweber, I added $user_name to the opening function statement.
function wp_aff_aweber_new_signup_user($full_target_list_name,$fname,$lname,$email_to_subscribe,$user_name)
then under the $params = array( I added:
‘custom_fields’ => array(
‘Affiliate ID’ => $user_name,
),
so the full statement now looks like:
$params = array(
’email’ => $email_to_subscribe,
‘name’ => $fname.’ ‘.$lname,
‘custom_fields’ => array(
‘Affiliate ID’ => $user_name,
),
);
When that didn’t work, I tried adding a third line to the email parser statement:
$body = “nnThis is an automatic email that is sent to AWeber for member signup purposen”.
“nEmail: “.$cust_email.
“nName: “.$cust_name.
“nAffiliate ID: “.$user_name;
along with a third rule to the email parser in Aweber, but the Affiliate ID still doesn’t seem to be showing up in Aweber.
Any ideas what I might be doing wrong?
Thanks!
Jeremiah
June 2, 2012 at 4:37 am #45792adminKeymasterWe don’t have a feature to add custom fields but you can try the following:
You should be able to customize the following code block from the “wp_aff_aweber_new_signup_user” function and add the custom field data to pass to AWeber:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
);June 2, 2012 at 4:55 am #45793kc0bukMemberHi Guys,
I’m using v 3.3.2 of WP Affiliate. Just updated it a couple days ago, so I should have the current version already, unless there has been a very recent update.
Already tried modifying that statement to:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
'custom_fields' => array(
'Affiliate ID' => $user_name,
),
);
but that doesn’t seem to be passing the custom field to Aweber. Does the PHP look right?
Sorry for the noob questions. I’m not actually a developer. Just know enough to get myself in trouble.
Thanks!
June 2, 2012 at 11:58 pm #45794adminKeymasterYou should be fine then. You mentioned about using the parser but we are now using the new API so I thought you needed to update.
Now, in the code you are referring to a variable called “$user_name” which is not present there so that variable has no value in it. Try something like the following to test and see if any value actually gets passed at all:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
'custom_fields' => array(
'test1' => 'value1',
),
);August 30, 2012 at 1:30 am #45795ArtisantopiaMemberHI! I’m trying to do exactly the same thing, thank you for these instructions.
I followed the instructions above and it worked when I just used some text for testing:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
'custom_fields' => array(
'AffID' => 'TestAffID',
),
);So then I added $user_name to this line:
function wp_aff_aweber_new_signup_user($full_target_list_name,$fname,$lname,$email_to_subscribe,$user_name)
And this:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
'custom_fields' => array(
'AffID' => $user_name,
),
);After completing the signup form I got this error message on the page [http://domain.com/affiliates/?wp_affiliate_view=signup]
Warning: Missing argument 5 for wp_aff_aweber_new_signup_user(), called in /home/user/public_html/wp-content/plugins/wp-affiliate-platform/wp_aff_auto_responder_handler.php on line 225 and defined in /home/user/public_html/wp-content/plugins/wp-affiliate-platform/wp_aff_auto_responder_handler.php on line 6
The user was added to the Aweber mailing list, but the AffID field is blank.
I’m sure I’m just missing a step to get the details into $user_name, but I don’t know enough to work out what I’m doing wrong!
Thanks for your help.
August 30, 2012 at 11:26 pm #45796adminKeymasterYou are not passing the argument correctly. If you want to pass the username then you will need to pass it through all the functions not just in one place.
Revert back everything you did and simply try the following where the params get defined:
$params = array(
'email' => $email_to_subscribe,
'name' => $fname.' '.$lname,
'custom_fields' => array(
'AffID' => $_POST['user_name'],
),
);December 12, 2013 at 1:40 pm #45797dj_cholapinMemberHello everybody,
I was looking for the exact same thing, this is what I’ve done, according to the informations you gave :
– function wp_aff_aweber_new_signup_user($full_target_list_name,$fname,$lname,$email_to_subscribe,$user_name)
– $params = array(
’email’ => $email_to_subscribe,
‘name’ => $fname.’ ‘.$lname,
‘custom_fields’ => array(
‘XXX’ => $_POST,
),
);
And it works like a charm ! (Hope it will help someone looking to do the same thing).
I was asking myself, if this is possible with the user ID, I’m guessing this is also possible with the adress, paypal email, and other fields ?
In this case, do you know where I can find the correct name of the parameters for the other fields ? (For the ID its ‘user_name’, etc.) For example this ones : Company / Paypal Email / TVA Number / Street / City / Zip Code / Country / Telephone / Password…
The point would be to pass every data that the member filled, to aweber.
Thanks in advance !
December 12, 2013 at 11:07 pm #45798adminKeymasterHere is a list of other info you can get for your affiliate (who just signed up for an account). If you ignore the “a” at the start, you will know what value the field contains.
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
$_POST
December 17, 2013 at 4:55 pm #45799dj_cholapinMemberMany thanks for that, exactly what I was looking for ! Thank you !
March 9, 2014 at 1:17 pm #45800domingosannaMemberHello team,
I am trying to automatically transfer to Aweber a custom field from eMember called “token” everytime a customer sign up as a new member.
This is basically a requirement from other plugin called “Scarcity Samurai” and the “token” field should be hidden to customers in the registration form.
I have follow this conversation with interest and it looks that a similar solution could be adopted for me. Am I right? My apologies if I am quite wrong. I am not a developer just very enthusiastic marketer.
– $params = array(
’email’ => $email_to_subscribe,
‘name’ => $fname.’ ‘.$lname,
‘custom_fields’ => array(
‘token’ => $_POST,
),
);
If this works. Which API file should I to modify since I did not find a wp_aff_auto_responder_handler.php file in eMember plugin.
Thanks!
March 9, 2014 at 8:26 pm #45801adminKeymasterLook in the following file for emember:
eMember_auto_responder_handler.php
March 10, 2014 at 10:34 am #45802domingosannaMemberHi, thanks!
I’ve tried it without success. Is there anything else that I should config in addition to enter the code bellow in the eMember_auto_responder_handler.php?
– $params = array(
’email’ => $email_to_subscribe,
‘name’ => $fname.’ ‘.$lname,
‘custom_fields’ => array(
‘token’ => $_POST,
),
);
March 11, 2014 at 2:18 am #45803adminKeymasterDo you have an input field named “token” in the registration form of emember that has your token value?
March 11, 2014 at 1:29 pm #45804domingosannaMemberI do! Two comments that could help to clarify here:
– First, this token field is demanded by other plugin, Scarcity Samurai. It is used to track the original opt-in customer and provided him or her with an offer that expire after a limited period of time (which is configurable). That’s because you need to assure the countdown will keep running always in the background instead a resetting to the maximum allowed time when the customer log-in again and again.
– Second, Scarcity Samurai demands this field should be hidden in the opt-in form since they provide it with token value through their plugin.
It works pretty well when you login directly through auto responders (Mailchimp and Aweber)or user the HTML they provide to load in your page.
I have tested both autoresponder lists. In both, you have to create a custon “token” field and put it as hidden in their forms prior to use Scarcity Samurai.
I am trying to recreate the same process with eMember. Otherwise I will have unsynchronized users in Aweber or Mailchimp since I have to opt in first using this lists services and missing this customers in eMember.
Second good alternative would be if a customer, first registered in Aweber or Mailchimp, become automatically added in eMember through API or other mechanism.
It is possible any of those? Other ideas?
thanks!
March 12, 2014 at 1:40 am #45805adminKeymasterIf the token field is added to the registration form then it should have gotten submitted.
Anyway, there is a mistake somewhere in the customization and a developer needs to look at it. This is not one of our supported features so we can’t do this for free. You can use the following option:
-
AuthorPosts
- You must be logged in to reply to this topic.