customized email signup with radio box

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Tea-Dev
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Wed Oct 12, 2011 11:15 am

customized email signup with radio box

Post by Tea-Dev » Fri Aug 30, 2013 8:31 am

I am trying to integrate the email signup in one of the programs I have. I added the code below, but it is not working. Want to add an email to the default email list only if the user checked "Yes" on a radio box.
Can anyone make any suggestions.
thank you.

Code: Select all


	 protected void Page_Init(object sender, EventArgs e)
	 {
		if (_EmailListId == 0)
		{
			_EmailListId = Token.Instance.Store.Settings.DefaultEmailListId;
		}
	 }

.
.
.
.

try
            {
            	string lclEmail = Page.Request.Form["Email"];
	string lclSignup = NewsletterSignup.Text.ToString();

               EmailList LclEmailList = EmailListDataSource.Load(_EmailListId);
	

	if(lclSignup == "Yes" ) {
            		if (LclEmailList.IsMember(lclEmail) == false) { 
			LclEmailList.ProcessSignupRequest(lclEmail);
		}
	}

      }
     catch (System.Data.OleDb.OleDbException exception)
     {
    }
            /////////////////////////////////////////
            
            
            
        }

Tea-Dev
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Wed Oct 12, 2011 11:15 am

Re: customized email signup with radio box

Post by Tea-Dev » Fri Aug 30, 2013 8:51 am

Not sure of the email options play a role in the problem we have.

The options that are set for this email list :
Signup Rule: Opt-In with with Confirmation
Signup Email: Email List Signup Notification Only

Do we need to reset any of these options to make the program work?

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: customized email signup with radio box

Post by AbleMods » Wed Sep 04, 2013 5:34 am

Tea-Dev wrote:I added the code below, but it is not working
Do you get any sort of error message? Or does the page simply complete as if everything worked ok?

The signup email address should get an email from the Able system confirming they have been signed up. Is that email being received?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Tea-Dev
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Wed Oct 12, 2011 11:15 am

Re: customized email signup with radio box

Post by Tea-Dev » Wed Sep 18, 2013 11:51 am

no error messages. looks as if it is working...no email generated.
replace with add.members and it seems that the emails are being inserted into email list. No email is being sent though.

Would like to capture the name and address in the email list. is that possible.

Post Reply