Nope, it was never updated for the Zen Cart v1.3 to v1.5 change in the admin-level interfaces. I'm guessing that the number of core files that the plugin carves up is one of the reasons that no one has picked up the plugin's "baton".
Printable View
I created a define_subscribe_confirm.php under /includes/languages/english/html_includes, but when i clicked the link in the email, I was brought back to Newsletter Subscription page, not Newsletter Subscription Confirmation page I added. How to fix it?
Hey All,
Any chance this module works in 1.5.5?
Thanks, John
unlikely to work on 1.5.5
well it took quite a bit of file merging, but it does work. Definitely not good to just upload into a 1.5.5 file set.
John
I didn't click "yes" for Display on Menu button, so I cannot see the "Subscriber Manager" under "customers". How can I fix it? I am so upset with myself.....
I updated version waiting on approval. I added an admin page and made changes for it to work with 1.5.5.
I was having the same issue in getting the "1062 Duplicate entry" error when a newsletter subscriber then tried to create an account. This has resolved the issue for me. It does shorten the section of code a fair amount, so hopefully no side effects.
Should this fix by @kamelion0927 be updated in the plugin release?
I've been using this mod for some time, but during one of my upgrades the create account side wasn't working to catch existing subscriptions. I tried adding your code and no luck on that ether. Going back to what I needed it to do, I came up with this change.
I removed count for matching email address, should only be one and I'm not in a loop. Removed the empty test, it's never empty and I need to know if its a 1. Tested in ZC 1.5.5f and working.Code:// BEGIN newsletter_subscribe mod 1/1
// If a newsletter only account exists we update the info,
// If not and the new user selected subscribe we add them to the list
if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') && (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) {
$check_subscribers_sql = "select email_address from " . TABLE_SUBSCRIBERS . " where email_address = :email:";
$check_subscribers_query = $db->bindVars($check_subscribers_sql, ':email:', $email_address, 'string');
$check_subscribers = $db->Execute($check_subscribers_query);
if ($check_subscribers->fields['email_address'] != '') {
// update Subscriber with new customer ID
$sql = "UPDATE " . TABLE_SUBSCRIBERS . "
SET customers_id = :customer_id:
WHERE email_address = :email_address:";
$sql = $db->bindVars($sql, ':customer_id:', (int)$_SESSION['customer_id'], 'integer');
$sql = $db->bindVars($sql, ':email_address:', $email_address, 'string');
$db->Execute($sql);
// update the new customer with an active subscription
$news_query = "UPDATE " . TABLE_CUSTOMERS . "
SET customers_newsletter = 1
WHERE customers_id = :customer_id:";
$news_query = $db->bindVars($news_query, ':customer_id:', (int)$_SESSION['customer_id'], 'integer');
$db->Execute($news_query);
} else {
if ($newsletter == 1) {
// new customer subscription we need to add them to our subscription database too
$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 */
Does anybody know how I can use Google Recaptcha with this please?
Contribution found here:
https://www.zen-cart.com/downloads.php?do=file&id=1455