-
Re: Newsletter-Only Subscriptions for v1.3x
Hi there,
I think installed the mod okay. I tested it by sending the confirmation to my email.
However, when I was going to the "USAGE INSTRUCTIONS" in the Read Me file, I didn't seem to get through to this point:
Under 'Tools -> Send Email' you'll see new customer groups:
Email Test Group - Customers
Email Test Group - Newsletter-only subscribers
These two fields pull the correct emails you designated in your
Newsletter Test Group Email settings.
Newsletter Subscribers
Customer Account Newsletter Subscribers
Newsletter-only Subscribers
I don't see new customer groups or Newsletter Subscribers under 'Tools -> Send Email'.
Rather, under Tools ->Send Email, it says:
"Send Email To Customers Text Editor
1267 Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation 'locate'
in:
[SELECT s.email_address as customers_email_address FROM subscribers as s LEFT JOIN configuration as q on LOCATE( s.email_address, q.configuration_value) >= 1 WHERE configuration_key = 'NEWSONLY_SUBSCRIPTION_TEST_GROUP' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields."
What does this mean? Can someone please help? Thank you.
-
Re: Newsletter-Only Subscriptions for v1.3x
Hi!
I've installed this mod. But in the mail to confirm the subscription missing the link!
Help me please!
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
gilby
And....
For those following this thread the answer was????
I also have this problem, has anyone found a solution yet?
:cry:
I will be your friend for life if you can help me because I thought I had looked in pretty much every PHP file and can't work out why this is happaning
http://www.thephonebox.co.uk/
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
somi97
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
This problem I mean :p
-
Re: Newsletter-Only Subscriptions for v1.3x
http://www.zen-cart.com/forum/images/smilies/clap.gif
I found out why the confirmation link wasn't showing up in the customer confirmation emails. It is because I forgot to upload email/email_template_newsletter_subscription.html and the email/email_template_newsletter_unsubscription.html. If other similar things are not working for you be sure to double check that you have uploaded all of the files to the correct folders.
-
Re: Newsletter-Only Subscriptions for v1.3x
Has anyone tried this addon in Zen Cart Ver 1.5 yet?
-
Re: Newsletter-Only Subscriptions for v1.3x
I too would like to know if anyone is running this successfully on V1.5. Sounds like there are quite a few issues with it running on the older versions. Anyone tried it on V 1.5 yet?
-
Re: Newsletter-Only Subscriptions for v1.3x
Hello ;-)
I have a version of the newsletter subscribe module working on a version 1.5. cart. The module is showing as a configuration menu item instead of a customers menu item. I can't upload the zip here because it is too large. Is there any way that I can post the code here somewhere so that someone can take a look at it for me? I am not a php programmer ;-)
Please try only in a test environment.
The code is here:
Upgraded Newsletter Subscribe
Thanks,
Anne
-
Re: Newsletter-Only Subscriptions for v1.3x
Ok, I've worked out how to add the pages into the correct place in the admin menus.
Now, if someone could just take a look at the zip and let me know if there are any security related or other problems.
Thanks,
Anne
-
Re: Newsletter-Only Subscriptions for v1.3x
You're probably far better off integrating something like the Mailchimp sidebox and having your customers signup for your newsletter that way. Then periodically export your newsletter subscribers from your store using the Email Address Exporter, and load them into your Mailchimp account.
I make that recommendation because the Mailchimp addon involves only a small handful of files. But this archaic old "Newsletter Subscribe" addon alters a zillion core files and makes upgrading a NIGHTMARE, plus results in tons of confusing support requests when someone decides to uninstall it because uninstalling isn't clean or easy.
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
DrByte
You're probably far better off integrating something like the Mailchimp sidebox and having your customers signup for your newsletter that way. Then periodically export your newsletter subscribers from your store using the Email Address Exporter, and load them into your Mailchimp account.
I make that recommendation because the Mailchimp addon involves only a small handful of files. But this archaic old "Newsletter Subscribe" addon alters a zillion core files and makes upgrading a NIGHTMARE, plus results in tons of confusing support requests when someone decides to uninstall it because uninstalling isn't clean or easy.
Thank you so much :smile:
Thanks,
Anne
-
Re: Newsletter-Only Subscriptions for v1.3x
What version of Zen Cart are you using?: 1.3.9h
What addons have you installed?
Newsletter Subscribe, Version: 2.2.2, Last Updated: Jan 07 2011
When? 01/24/2012
Question:
* I would like to send a newsletter to customers who have not registered or created an account. So, the email must have the link for customers to 'unsubscribe'. With this module installed, the 'unsubscribe' option under information box will request customers to enter username/password. But what about of customers don't have an account and don't have login credentials, can they still unsubscribe?
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
jose2250
What version of Zen Cart are you using?: 1.3.9h
What addons have you installed?
Newsletter Subscribe, Version: 2.2.2, Last Updated: Jan 07 2011
When? 01/24/2012
Question:
* I would like to send a newsletter to customers who have not registered or created an account. So, the email must have the link for customers to 'unsubscribe'. With this module installed, the 'unsubscribe' option under information box will request customers to enter username/password. But what about of customers don't have an account and don't have login credentials, can they still unsubscribe?
The unsubscribe link in the emails will go to an "unsubscribe" page with their email prefilled in.
It asks if they really want to unsubscribe?
When answered Yes it unsubscribes whether that subscriber has an account or not.
(It doesn't ask for login credentials)
-
Re: Newsletter-Only Subscriptions for v1.3x
I have just got this package installed in version 1.5, with a few alterations listed below:
First of all copy all files over as usual.
Alteration 1. -
Ignore the directory 'admin/includes/boxes' and also everything within.
Instead create an sql file with the following and run it through Tools->Install SQL Patches (or enter query manually)
Code:
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('subscrip##################er', 'BOX_CUSTOMERS_SUBSCRIPTION_MANAGER', 'FILENAME_SUBSCRIPTION_MANAGER', '', 'customers', 'Y', 1000);
Alteration 2. -
Find following file 'admin/includes/functions/extra_functions/subscription_manager.php'
Search for 'TYPE=MyISAM' and replace with 'ENGINE=MyISAM'.
(Not sure if this alt is database version specific though!! - so may only require first alt)
You should now be good to Install, just go to Customers->Subscription Manager.
I have tested briefly, though not thoroughly nor on a live store, and all seems fine.
-
Re: Newsletter-Only Subscriptions for v1.3x
Not sure why my sql statement was partially hashed out in last post.
That part should read - without the hyphens!!
's-u-b-s-c-r-i-p-t-i-o-n-M-a-n-a-g-e-r'
Don't think it matters what name you put in first field though.
-
Re: Newsletter-Only Subscriptions for v1.3x
Hi I have installed newsletter subscribe side box, its great i am using on zc version 1.39 h , i want to disable the side box for logged-in customers is there a way ....
-
Re: Newsletter-Only Subscriptions for v1.3x
hi i have installed this great add-on on zc version on 1.39h, i want to hide the side-box for logged-in customers, can this be accomplished and how?
-
Re: Newsletter-Only Subscriptions for v1.3x
Help, I am new to this. I installed the plug in but in my header the "Enter Email Address" gets cut off by the box. How do I alter the size of the letters. Also, the add on is not showing up in my admin, tools, layout boxes. It does show up in my configuration, store so it works in the header.
Thank you
-
Re: Newsletter-Only Subscriptions for v1.3x
-
Re: Newsletter-Only Subscriptions for v1.3x
please note: workaround above with change to database DOES NOT WORK... Do not attempt it will screw up your database and newsletter and send email will no longer work!!
-
Re: Newsletter-Only Subscriptions for v1.3x
THIS DOES NOT WORK and in fact, it screwed up my database so I had to reinstall and redo everything.
Please don't post a workaround if have not tested it...
Quote:
Originally Posted by
kcahir
I have just got this package installed in version 1.5, with a few alterations listed below:
First of all copy all files over as usual.
Alteration 1. -
Ignore the directory 'admin/includes/boxes' and also everything within.
Instead create an sql file with the following and run it through Tools->Install SQL Patches (or enter query manually)
Code:
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('subscrip##################er', 'BOX_CUSTOMERS_SUBSCRIPTION_MANAGER', 'FILENAME_SUBSCRIPTION_MANAGER', '', 'customers', 'Y', 1000);
Alteration 2. -
Find following file 'admin/includes/functions/extra_functions/subscription_manager.php'
Search for 'TYPE=MyISAM' and replace with 'ENGINE=MyISAM'.
(Not sure if this alt is database version specific though!! - so may only require first alt)
You should now be good to Install, just go to Customers->Subscription Manager.
I have tested briefly, though not thoroughly nor on a live store, and all seems fine.
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
HipChickDesigns
THIS DOES NOT WORK and in fact, it screwed up my database so I had to reinstall and redo everything.
Neither of theses changes would "screw up" anyone's database.. The first change would simply add the admin menu and the second is meant to apply to newer databases than when this mod was written so if your data base doesn't support the command it simply will error out.. The admin menu code posted does need a minor change as it looks like the forum parsed out some of the code particularly "subscrip##################er". (Edited to add: the forum has been configured to filters out certain words.. looks it didn't like the words s-u-b-s-c-r-i-p-t-i-o-n or n-e-w-s-l-e-t-t-e-r) So if you used this code AS IS, you would have gotten errors for sure..
Quote:
Originally Posted by
HipChickDesigns
Please don't post a workaround if have not tested it...
As for directing someone not to post a workaround??? This is a support forum for an open source application... written by volunteers and supported by the community volunteers.. People post code snippets ALL THE TIME that are tested, slightly tested, or even un-tested.. It is up to you to determine whether or not you should use them.. In the case of this code snippet, the community member clearly post that he had slightly tested the code..
Quote:
I have tested briefly, though not thoroughly nor on a live store, and all seems fine.
The real issue with this mod is probably related to how it's constructed to begin with, and the fact that it's a Zen Cart v1.3.x compatible mod that modifies many files and many of these same files changed with Zen Cart v1.5.. Dr Bytes advice is the real reason to NOT use this mod..
Quote:
Originally Posted by
DrByte
You're probably far better off integrating something like the Mailchimp sidebox and having your customers signup for your newsletter that way. Then periodically export your newsletter subscribers from your store using the Email Address Exporter, and load them into your Mailchimp account.
I make that recommendation because the Mailchimp addon involves only a small handful of files. But this archaic old "Newsletter Subscribe" addon alters a zillion core files and makes upgrading a NIGHTMARE, plus results in tons of confusing support requests when someone decides to uninstall it because uninstalling isn't clean or easy.
-
Re: Newsletter-Only Subscriptions for v1.3x
This module was working perfectly, till I messed it up.
Pulling my hair and don't know where to start?
I am now getting the Radio button choices for HTML or TEXT-Only appearing after the e-mail input box! And it wasn't there before. I need to get rid of it. :bangin:
-
Re: Newsletter-Only Subscriptions for v1.3x
I figure out what went wrong, and wanted to share it.
I had changed the admin>Configuration>E-MailOptions>Use MIME HTML When Sending Emails to true from false.
That triggered the if statement in includes/templates/YourTemplate/templates/tpl_subscribe_header.php to place the radio button options of HTML or TEXT-ONLY to appear.
Since I did want to send out my e-mail notifications as HTML and did not want the choice to appear, I changed the following:
PHP Code:
if(EMAIL_USE_HTML == 'true') {
$content .= '<label>' . zen_draw_radio_field('email_format', 'HTML', true) . ENTRY_EMAIL_HTML_DISPLAY . '</label>';
$content .= '<label>' . zen_draw_radio_field('email_format', 'TEXT', false) . ENTRY_EMAIL_TEXT_DISPLAY . '</label>';
}
$content .= zen_image_submit (BUTTON_IMAGE_SUBSCRIBE,HEADER_SUBSCRIBE_BUTTON, 'value="' . HEADER_SUBSCRIBE_BUTTON . '" ');
$content .= '</form>';
?>
to:
PHP Code:
if(EMAIL_USE_HTML == 'CHANGED FROM true TO THIS. READ ABOVE MEMO') {
$content .= '<label>' . zen_draw_radio_field('email_format', 'HTML', true) . ENTRY_EMAIL_HTML_DISPLAY . '</label>';
$content .= '<label>' . zen_draw_radio_field('email_format', 'TEXT', false) . ENTRY_EMAIL_TEXT_DISPLAY . '</label>';
}
$content .= zen_image_submit (BUTTON_IMAGE_SUBSCRIBE,HEADER_SUBSCRIBE_BUTTON, 'value="' . HEADER_SUBSCRIBE_BUTTON . '" ');
$content .= '</form>';
?>
Make sure to add a comment of why you did this .
Or you can simply comment out that the if statement.
-
Re: Newsletter-Only Subscriptions for v1.3x
using 1.3.9h store for this person
she used to have this installed then something happened and it seemed to have partially vanished. I reinstalled all the files and it is working once more BUT in admin when you go to the Customers/Subscription Manager to view the ones that have subscribed....the date of subscription is not quite right.
I tested it with adding my own subsription to my account -- both using the little header subscribe and the sidebox subscribe forms and both times this is what the date claims to be: 11/30/2036 not quite right I would say...lol
how can I get it to register the correct date of subscribing?
-
Re: Newsletter-Only Subscriptions for v1.3x
I know this is an old thread, but was wondering if the 1.5 version just released has a fix for the following:-
Quote:
Parse error: syntax error, unexpected T_CASE in /*****/customers.php on line 341
I double checked and everything is there and uploaded properly. Thanks for any help with this.
-
Re: Newsletter-Only Subscriptions for v1.3x
i got the same problem. Was hoping someone can help me. I try to change the line 341 in customers php. Find the line customer and change it to customers as it was advice on 2 or 3 page of this thread. Still the same The only what help me was to replace the new file with the old back up version of customers.php and the problem seems to disappear.
-
Re: Newsletter-Only Subscriptions for v1.3x
Can anyone direct me to a site where I can see how this add-on looks from the customer's perspective?
Thanks!
-
Re: Newsletter-Only Subscriptions for v1.3x
Hello,
I have just installed a fresh version. When I click on Customers > Subscription Manager I get:
Parse error: syntax error, unexpected T_CASE in /home/content/96/11406796/html/2014/myadmin/customers.php on line 341
Andy idea?
Thanks!
-
Re: Newsletter-Only Subscriptions for v1.3x
It's actually when I click Customers > Customers. I don't see a Subscription Manager option in the Customers drop down menu.
-
Re: Newsletter-Only Subscriptions for v1.3x
Okay, I see I had to register the link in Admin Page and have installed it okay but I still get the parse error when I click Customers > Customers
Parse error: syntax error, unexpected T_CASE in /home/content/96/11406796/html/2014/myadmin/customers.php on line 341
-
Re: Newsletter-Only Subscriptions for v1.3x
-
Re: Newsletter-Only Subscriptions for v1.3x
Just thought this post bore re-posting..
Quote:
Originally Posted by
DrByte
You're probably far better off integrating something like the Mailchimp sidebox and having your customers signup for your newsletter that way. Then periodically export your newsletter subscribers from your store using the Email Address Exporter, and load them into your Mailchimp account.
I make that recommendation because the Mailchimp addon involves only a small handful of files. But this archaic old "Newsletter Subscribe" addon alters a zillion core files and makes upgrading a NIGHTMARE, plus results in tons of confusing support requests when someone decides to uninstall it because uninstalling isn't clean or easy.
-
Re: Newsletter-Only Subscriptions for v1.3x
Thanks, I'll look into that but for now I have it installed already and don't want to create a bigger mess trying to remove it.
-
Re: Newsletter-Only Subscriptions for v1.3x
I'm having the same issue. Also, when i go to the customers -> customers tab, all I get is a blank page. Everything else seems to be working. I've gone as far as using Filemerge to find the file edits, but nothing stands out code wise.
-
Re: Newsletter-Only Subscriptions for v1.3x
I had the same problem. Now it is working fine for me. What I did is to only copy code sections those related to the Addon from new customer.php to the existing customer.php. Also check the folders name before copying files. Do not forget to change YOUR_TEMPLATE to your template name, and also for module name. One last thing, for those who do not see Subscription Manager under Customer menu, do not forget to register the page at Admin Access Management>Admin Page Registration with the information given Admin page registration.txt file.
Quote:
Originally Posted by
sambenet
I'm having the same issue. Also, when i go to the customers -> customers tab, all I get is a blank page. Everything else seems to be working. I've gone as far as using Filemerge to find the file edits, but nothing stands out code wise.
-
Newsletter-Only Subscriptions for v1.5.1
Okay, new problem! I am having weird issues with data base interactions, specifically adding new subscriptions to the database. When I add new subscriptions manually through the Admin (which I do frequently), The first address works fine, but any subsequent additions get and error. The problem is that any new address is getting added with an index of 0 (subscriber number) and not at the end of the table as it should be. If I go into PHPmyAdmin and manually change the Subscriber Number to the next appropriate one, everything works fine. For exactly one entry. The other problem, which seems related, is whenever someone tries to sign up from the normal website, there is an error. I can't seems to track down exactly 'what' error, but is seems to be the same kind of issue. If the email address is already in the database, then it is properly found and the "email address is already subscribed" message properly is displayed. So, somewhere, and I can't find where, the plugin is not correctly finding the right index for the next subscription and not advancing it the way it should. If there is anyone still supporting this plugin who can help, it would be greatly appreciated.
-
Re: Newsletter-Only Subscriptions for v1.5.1
I installed the newest newsletter add-on onto my 1.5.3 zencart store. When I upload the file in newsletter admin/customer.php. The customer/customer page went blank. When I upload the original zencart customer.php back to my store, the customer/customer page went back. All other newsletter files stayed.
I noticed somebody else reported the same issue. Did anybody figure it out?
-
Re: Newsletter-Only Subscriptions for v1.5.1
Quote:
Originally Posted by
lina0962
I installed the newest newsletter add-on onto my 1.5.3 zencart store. When I upload the file in newsletter admin/customer.php. The customer/customer page went blank. When I upload the original zencart customer.php back to my store, the customer/customer page went back. All other newsletter files stayed.
I noticed somebody else reported the same issue. Did anybody figure it out?
In the page customers.php there is an error at line 251...
This line:
if ($check_email->RecordCount() > 0) {
is double, delete one and the file is ok.... ;-)
-
Re: Newsletter-Only Subscriptions for v1.5.1
I installed this on 1.5.4 but don't see any links to firstly upgrade the database and secondly no link Subscription Manager under the customers menu. Is this ready for 1.5.4?
-
Re: Newsletter-Only Subscriptions for v1.5.1
Quote:
Originally Posted by
Nick1973
I installed this on 1.5.4 but don't see any links to firstly upgrade the database and secondly no link Subscription Manager under the customers menu. Is this ready for 1.5.4?
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".
-
Re: Newsletter-Only Subscriptions for v1.5.1
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?
-
Re: Newsletter-Only Subscriptions for v1.3x
Hey All,
Any chance this module works in 1.5.5?
Thanks, John
-
Re: Newsletter-Only Subscriptions for v1.3x
unlikely to work on 1.5.5
-
Re: Newsletter-Only Subscriptions for v1.3x
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
-
Re: Newsletter-Only Subscriptions for v1.3x
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.....
-
Re: Newsletter-Only Subscriptions for v1.3x
I updated version waiting on approval. I added an admin page and made changes for it to work with 1.5.5.
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
kamelion0927
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
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?
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
millsii
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.
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 */
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.
-
Re: Newsletter-Only Subscriptions for v1.3x
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
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
Nick1973
Yes i'd like to do that also as we are being spammed constantly without it.
-
Re: Newsletter-Only Subscriptions for v1.3x
-
3 Attachment(s)
Re: Newsletter-Only Subscriptions for v1.3x
zen cart version:1.55f
newsletter_subscribe_3.0.2
Can't send mail
Attachment 19031
Attachment 19029
I try to close
Configuration -> My Store -> Enable Newsletter-only subscriptions? -> false
it's work
Attachment 19030
:blink:May I ask where the plugin is not set correctly?
-
Re: Newsletter-Only Subscriptions for v1.3x
I sent in an update for ZC1.5.7 and it's posted. I just found that the header add-in didn't get coded correctly in my default install on the version I sent in. Fixed and sent into GitHub, will wait and see what else I missed before sending in another update.
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
davewest
I sent in an update for ZC1.5.7 and it's posted. I just found that the header add-in didn't get coded correctly in my default install on the version I sent in. Fixed and sent into
GitHub, will wait and see what else I missed before sending in another update.
This site has begun pulling this error after upgrading to 1.5.7b:
Quote:
[06-Feb-2021 17:40:05 America/Chicago] Request URI: /zc_admin/index.php?cmd=subscription_manager&action=purgeunconfirmed, IP address: 74.175.45.91
--> PHP Fatal error: Uncaught Error: Call to undefined function zen_admin_demo() in /home3/*****/public_html/zc_admin/subscription_manager.php:134
Stack trace:
#0 /home3/*****/public_html/zc_admin/index.php(11): require()
#1 {main}
thrown in /home3/*****/public_html/zc_admin/subscription_manager.php on line 134.
Any help would be appreciated
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
Wulf359
This site has begun pulling this error after upgrading to 1.5.7b:
ZC1.5.7b, in version 3.1 of this mod (zen_admin_demo) was replaced, but after looking, it was one area that was untouched and needed some more work. You may still be using an older version of the admin page.. I would pull a copy off GitHub and compare. I just pushed up the change as follows..
Code:
case 'purgeunconfirmed':
$expireTest = $db->Execute('SELECT COUNT(*) AS total FROM ' . TABLE_SUBSCRIBERS . ' WHERE confirmed != 1 and (customers_id IS NULL or customers_id = 0) and DATE_SUB(CURDATE(),INTERVAL 30 DAY) > subscribed_date ');
if($expireTest->fields['total'] > 0) {
$db->Execute('delete from ' . TABLE_SUBSCRIBERS . ' where confirmed != 1 and (customers_id IS NULL or customers_id = 0) and DATE_SUB(CURDATE(),INTERVAL 30 DAY) > subscribed_date ');
$messageStack->add(TEXT_INFO_SUBSCRIPTIONS_PURGED, 'success');
} else {
$messageStack->add(TEXT_ERROR_SUBSCRIPTIONS_PURGED, 'info');
}
$action = '';
break;
Well send an update shortly..
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
davewest
ZC1.5.7b, in version 3.1 of this mod (zen_admin_demo) was replaced, but after looking, it was one area that was untouched and needed some more work. You may still be using an older version of the admin page.. I would pull a copy off GitHub and compare. I just pushed up the change as follows..
Code:
case 'purgeunconfirmed':
$expireTest = $db->Execute('SELECT COUNT(*) AS total FROM ' . TABLE_SUBSCRIBERS . ' WHERE confirmed != 1 and (customers_id IS NULL or customers_id = 0) and DATE_SUB(CURDATE(),INTERVAL 30 DAY) > subscribed_date ');
if($expireTest->fields['total'] > 0) {
$db->Execute('delete from ' . TABLE_SUBSCRIBERS . ' where confirmed != 1 and (customers_id IS NULL or customers_id = 0) and DATE_SUB(CURDATE(),INTERVAL 30 DAY) > subscribed_date ');
$messageStack->add(TEXT_INFO_SUBSCRIPTIONS_PURGED, 'success');
} else {
$messageStack->add(TEXT_ERROR_SUBSCRIPTIONS_PURGED, 'info');
}
$action = '';
break;
Well send an update shortly..
Thanks, we noticed this error when trying to delete one person under the Customers> Subscription Manager> page, for some odd reason it just kept pulling that error. Thanks for looking into this.
-
Re: Newsletter-Only Subscriptions for v1.3x
I believe the edits in includes/modules/pages/account_edit/header_php.php shouldn't be there and should be removed from the plugin. If a customer wants to edit his/her account and change name or even email format, this plugin prevents it because that email address already exists in the database - well, of course it exists, it's an existing account...
Somebody please correct me if I'm wrong or if I'm missing something, but I believe this plugin shouldn't affect the mentioned file.
EDIT: actually, the second edit should remain, it's just the first part (change 1/2) that shouldn't be there...
-
Re: Newsletter-Only Subscriptions for v1.3x
157c
fuzztrip.com
Hi, I'm trying to install this on version 157c. I get blank category and product pages. This is the error message I get.
[05-Jul-2021 16:48:26 UTC] Request URI: /lp-c-1/mos-generator-diaul-split-vinyl-lp-white-p-143.html, IP address: 173.76.37.155
#1 require() called at [/includes/modules/sideboxes/responsive0clone/subscribe_header.php:20]
#2 include(/includes/modules/sideboxes/responsive0clone/subscribe_header.php) called at [/includes/modules/column_left.php:24]
#3 require(/includes/modules/column_left.php) called at [/includes/templates/responsive0clone/common/tpl_main_page.php:151]
#4 require(/includes/templates/responsive0clone/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: require(includes/templates/template_default/templates/tpl_subscribe_header.php): failed to open stream: No such file or directory in /includes/modules/sideboxes/responsive0clone/subscribe_header.php on line 20.
This is subscribe_header.php
PHP Code:
<?php
/**
* subscribe_header - this is a subscribe field that appears in the navigation header
* This uses the same base template as the subscribe sidebox.
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: subscribe_header.php,v 1.1 2006/06/16 01:46:15 Owner Exp $
*/
if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') &&
(NEWSONLY_SUBSCRIPTION_ENABLED=='on')) {
$show_subscribe_header= true;
}
if ($show_subscribe_header == true) {
$subscribe_text = HEADER_SUBSCRIBE_LABEL;
require($template->get_template_dir('tpl_subscribe_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_subscribe_header.php');
$title = '';
$title_link = false;
require($template->get_template_dir('tpl_box_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_header.php');
}
?>
Line 20
PHP Code:
require($template->get_template_dir('tpl_subscribe_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_subscribe_header.php');
Thanks!
-
Re: Newsletter-Only Subscriptions for v1.3x
i have been trying to install this.. I get that ##########__WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
i went through all the files and removed the blank spaces.. and reloaded and still cannot get this to install through the zcplugin manager.
Help
what more info do you need.
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
noppie
i have been trying to install this.. I get that ##########__WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
i went through all the files and removed the blank spaces.. and reloaded and still cannot get this to install through the zcplugin manager.
Help
what more info do you need.
What version for Zen Cart? What version Newsletter-only you are trying? Was the query backup before the error?
I think I was working on a higher version before my mind block... both are the installer versions and template changes..
Designed for ZC1.5.7 and tested only with php7.4 and with Newsletter-only v3.1 https://www.zen-cart.com/downloads.php?do=file&id=29
-
Re: Newsletter-Only Subscriptions for v1.3x
Quote:
Originally Posted by
davewest
What version for Zen Cart? What version Newsletter-only you are trying? Was the query backup before the error?
I think I was working on a higher version before my mind block... both are the installer versions and template changes..
Designed for ZC1.5.7 and tested only with php7.4 and with Newsletter-only v3.1
https://www.zen-cart.com/downloads.php?do=file&id=29
not sure what you mean by backup.. i have about 5 or 6 databases in my cpanel. when I upgrade my store..I just fill in the new database.. less errors that way for me anyway.
(You are presently using: v1.5.7c) zencart'
and the newsletter plugin is the latest on in the plugins.
-
Re: Newsletter-Only Subscriptions for v1.3x
Dave, are you still engaged with Zen Cart? There are a bunch of issues with the new version as have been noted here; not sure if we need to recommend the use of the prior version or not.
Here are a couple of logs:
[22-Jul-2022 14:53:01 America/New_York] Request URI: /mystore/newsletter.html, IP address: ::1
#1 require() called at [/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php:202]
#2 require(/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php) called at [/Users/scott/sites/mystore/index.php:94]
--> PHP Warning: require(includes/templates/template_default/templates/tpl_newsletter_default.php): failed to open stream: No such file or directory in /Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php on line 202.
[22-Jul-2022 14:53:01 America/New_York] PHP Fatal error: require(): Failed opening required 'includes/templates/template_default/templates/tpl_newsletter_default.php' (include_path='.:/Applications/MAMP/bin/php/php7.4.21/lib/php') in /Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php on line 202
----
[22-Jul-2022 14:36:18 America/New_York] Request URI: /mystore/, IP address: ::1
#1 require() called at [/Users/scott/sites/mystore/includes/modules/bootstrap/subscribe_header.php:20]
#2 include(/Users/scott/sites/mystore/includes/modules/bootstrap/subscribe_header.php) called at [/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_header.php:149]
#3 require(/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_header.php) called at [/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php:124]
#4 require(/Users/scott/sites/mystore/includes/templates/bootstrap/common/tpl_main_page.php) called at [/Users/scott/sites/mystore/index.php:94]
--> PHP Warning: require(includes/templates/template_default/templates/tpl_subscribe_header.php): failed to open stream: No such file or directory in /Users/scott/sites/mystore/includes/modules/bootstrap/subscribe_header.php on line 20.
[22-Jul-2022 14:36:19 America/New_York] PHP Fatal error: require(): Failed opening required 'includes/templates/template_default/templates/tpl_subscribe_header.php' (include_path='.:/Applications/MAMP/bin/php/php7.4.21/lib/php') in /Users/scott/sites/mystore/includes/modules/bootstrap/subscribe_header.php on line 20
Also the images in admin are not found when running the subscription_manager.php page.
-
Re: Newsletter-Only Subscriptions for v1.3x
For those using the prior version, there's a bug - if you had the plugin installed from before, the NEWSONLY_SUBSCRIPTION_HEADER config had the values 'on' and 'off' (not 'true' or 'false') so you'd have to update the code or update the database. The code checks for this value are inconsistent - ./includes/modules/bootstrap/subscribe_header.php checks for 'on' and the others check true/false so check carefully.
-
Re: Newsletter-Only Subscriptions for v1.3x
I'll also note that One-Page Checkout's "registered customers" feature provides a similar (and supported) means for customers to 'register' without providing address details ... at least until their first order.