Re: MailChimp Module Support and Troubleshooting
Is this all that needs to be changed? I see a number of other references to shippingFirstName, shippingLastName:
Also the store owner is reporting some "goofy formatting" in the First Name when they enter something like Tom and Sherry becomes Tom%20and%20Sherry
Thanks,
Leslie
Originally posted by afiumano
View Post
Is this all that needs to be changed? I see a number of other references to shippingFirstName, shippingLastName:
Code:
function mailchimp_checkbox(){
//set variables
var isChecked = $('input[name=newsletter]:checked').val();
var shippingEmail = $('#ShipEmail').val();
var shippingFirstName = $('#ShipFirstName').val();
var shippingLastName = $('#ShipLastName').val();
if (shippingEmail == ''){
alert("Please enter your email address above and try again.");
$('input[name=newsletter]').attr('checked', false);
}else if(shippingFirstName == ''){
alert("Please enter your first name above and try again.");
$('input[name=newsletter]').attr('checked', false);
}else if(shippingLastName == ''){
alert("Please enter your last name above and try again.");
$('input[name=newsletter]').attr('checked', false);
}else{
if( api_key == '' || list_id == ''){
alert("Please enter your MailChimp API Key and select a list in the Miva Merchant admin under utilities.");
}else{
if(isChecked){
disableCheckbox();
addSubscriber(api_key, list_id, shippingEmail, shippingFirstName, shippingLastName, 'checkbox_message');
setTimeout("enableCheckbox()",2000);
}else{
disableCheckbox();
removeSubscriber(api_key, list_id, shippingEmail, 'false', 'false', 'false', 'checkbox_message');
setTimeout("enableCheckbox()",2000);
}
} //end api key check
} //end input valudation
} // end mailchimp checkbox
Thanks,
Leslie
Comment