I would like to modify the Join our Mailing List Form block that shows on the side to include:
Email Address (required):
First Name:
Last Name:
Zip Code (Postal Code):
What is the best way to do this. I can not find where to modify this form.
Any suggestions?
I think this is what you want for the template changes:
/skins/YOURSKIN/customer/addons/news_and_emails/blocks/subscribe.tpl
Bob
Bob,
Thanks for the reply, but I know what template file to use, I am just not sure how to get the form fields into the database.
David
Take a look at /addons/news_and_emails/controllers/customer/newsletters.php. This part looks to be what you are after:
// First check if subscriber's email already in the list
$subscriber = db_get_row("SELECT * FROM ?:subscribers WHERE email=?s", $_REQUEST['subscribe_email']);
if (empty($subscriber)) {
[COLOR="Red"]$_data = array(
'email' => $_REQUEST['subscribe_email'],
'timestamp' => TIME,
);
$subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $_data);[/COLOR]
$subscriber = db_get_row("SELECT * FROM ?:subscribers WHERE subscriber_id = ?i", $subscriber_id);
} else {
$subscriber_id = $subscriber['subscriber_id'];
}
Bob