Author Topic: Auto opt  (Read 2618 times)

orders1

  • Posts: 14
    • View Profile
Auto opt
« on: November 08, 2007, 08:30:33 pm »
I wrote an email before about how if a user opts-in to the list pre-purchase, he can then be changed over to second list if he is brought to the sign up page without having him resubmit his info.  

I was told this can be done some php code. Is there anymore info on how to do this?

mike2

  • Posts: 193
    • View Profile
Auto opt
« Reply #1 on: November 09, 2007, 01:33:59 pm »
I do this on my order approved/complete page by calling this php/curl function:

Code: [Select]
<?php
$aff_form_data
="list=19&email=" $_SESSION['x_Email'] . "&fname=" $_SESSION['x_First_Name'] .
"&lname=" $_SESSION['x_Last_Name'] . "&seq=1&del=1";

$ch=curl_init(); 
curl_setopt($chCURLOPT_URL"http://www.mywebsiteURL.com/m/signup.php"); 
curl_setopt($chCURLOPT_SSL_VERIFYPEER0); 
curl_setopt($chCURLOPT_NOPROGRESS1); 
curl_setopt($chCURLOPT_VERBOSE1); 
curl_setopt($chCURLOPT_FOLLOWLOCATION,0); 
curl_setopt($chCURLOPT_POST1); 
curl_setopt($chCURLOPT_POSTFIELDS$aff_form_data); 
curl_setopt($chCURLOPT_TIMEOUT120); 
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_FORBID_REUSE1);
curl_setopt($chCURLOPT_FRESH_CONNECT1); 
$buffer curl_exec($ch); 
curl_close($ch); 
?>

orders1

  • Posts: 14
    • View Profile
Auto opt
« Reply #2 on: November 11, 2007, 02:44:10 pm »
Ok, so if I just insert that bit of code with my sign up url on my thank you page. The user who opted in eariler will then be changed over to the second list?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Auto opt
« Reply #3 on: November 13, 2007, 02:19:27 am »
Hi Guys,

Thanks for your helpful response as always, Mike.

Yes, what you would do is add some custom code in a very specific place of your payment processing script.  (ie. Your thank you page)  If your cart doesn't let you run PHP in your thank-you page you would have to modify the script near the part that outputs the thank-you page.

A simple "signup to list" as described in this post would do it, combined with the Additional Operations feature on the List Settings page set to remove users from the pre-sales list.

If you let us know which shopping cart you are using (providing it's free) I might be able to assist further with where exactly in the files the code should go.

Some existing processing scripts feature ListMail plugins, such as aMember and aShop help you do this more easily.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting