I just implemented the module. When I try to unsubscribe, I have to log in. Is this how it is supposed to work? How can a customer log in if they just provided an email account and didn't create a customer account?
I just implemented the module. When I try to unsubscribe, I have to log in. Is this how it is supposed to work? How can a customer log in if they just provided an email account and didn't create a customer account?
Kevin Rosenzweig http://FluffyRump.com
<a href="http://fluffyrump.com">FluffyRump.com: Cloth diapers and green accessories for the family</a>
Hi there,
First of all - Thank you for a great contrubution!
Version 2.2.2 on Zencart 1.3.9h. I got a problem with the confirmation email after a customer has signed up for the newsletter.
When choosing E-mail only, the customer doesn't recieve any link to confirm the subscription.
It works fine if they choose Text-only and they get a confirmation link. (index.php?main_page=subscribe_confirm&confirm=XXXXXX&[email protected])
Anyone knows what's wrong?
Thank you in advance!
When a customer that is a newsletter only subscriber tries to create an account, we get an error like this...
1062 Duplicate entry 'stefanie.pr######################' for key 2
in:
[INSERT INTO zen_subscribers (customers_id, email_address, email_format, confirmed, subscribed_date) VALUES ( 34, 'xxx######################', 'HTML', '1', now())]
Kevin Rosenzweig http://FluffyRump.com
<a href="http://fluffyrump.com">FluffyRump.com: Cloth diapers and green accessories for the family</a>
In includes/modules/your_template/create_account.php, find the code between // BEGIN newsletter_subscribe mod 1/1 and // END newsletter_subscribe mod 1/1 and try replacing it with:
PHP Code:
// BEGIN newsletter_subscribe mod 1/1
// If a newsletter only account exists we update the info,
// but keep the subscription active, and give them a message that to
// change they should do so on their account page (after creation).
if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') && (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) {
$check_subscribers_query = "select count(*) as total from " . TABLE_SUBSCRIBERS . "
where email_address = '" . zen_db_input($email_address) . "' ";
$check_subscribers = $db->Execute($check_subscribers_query);
if ($check_subscribers->fields['total'] > 0) {
$sql = "UPDATE " . TABLE_SUBSCRIBERS . " SET
customers_id = '" . (int)$_SESSION['customer_id'] . "',
email_format = '" . zen_db_input($email_format) . "',
confirmed = '1'
WHERE email_address = '" . zen_db_input($email_address) . "' ";
$db->Execute($sql);
$messageStack->add_session('login', SUBSCRIBE_MERGED_NEWSONLY_ACCT);
} else {
if (!empty($newsletter)) {
$sql = "INSERT INTO " . TABLE_SUBSCRIBERS . "
(customers_id, email_address, email_format, confirmed, subscribed_date)
VALUES ('" . (int)$_SESSION['customer_id'] . "', '" . zen_db_input($email_address) . "', '" . zen_db_input($email_format) . "', '1', now())";
$db->Execute($sql);
}
}
}
// END newsletter_subscribe mod 1/1
Thanks for the code kamelion0927, I just installed the subscriber and had the same problem as kwrosenzweig but all seems to be sorted now.
Another question:
I want the subscriber in the footer instead of the header, so I simply used the code from the instructions and put it into the tpl_footer.php. Seems to work so far but is that going to cause any problems in the future?
Cheers
Pacu
I've had mine in the footer for a while and haven't been generating any errors. :)
Thanks for replying, I will stick with it then.
I was looking for the code for Newsletter Subscribe in the footer.
Since you have done it succesfully, could you please send it across.
Thanks
http://www.raunharman.com
http://www.raunharman.net
Website Development, E-Book Solutions & Handicraft Exports
I've installed the mod and it's worked perfectly. However, it's added the word "subscribe" to the site title and at the bottom of the main content area. I removed all the files however the subscribe: keep appearing
How do I get rid of that?! (see site here: http://www.ironsightsfirearms.com
Bookmarks