Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / Newsletter-Only Subscriptions for v1.3x

Newsletter-Only Subscriptions for v1.3x

15 Dec 2007, 8:17 PM
#601
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Post #601 by cjpinder

Robbyn7:

I finally merged my Create Account files and now I receive the following when I create an account:
1062 Duplicate entry '[email protected]' for key 2
in:
[INSERT INTO zen_subscribers (customers_id, email_address, email_format, confirmed) VALUES ('65', '[email protected]', 'HTML', '1')]
Please see my reply in your other thread...
http://www.zen-cart.com/forum/showpost.php?p=475741&postcount=15

Regards,
Christian.

19 Dec 2007, 5:00 PM
#603
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #603 by dharma

I removed NLS 2.0.6 on my 1.3.7 Zen Cart, to ease my upgrade to 1.3.8a and await a new tested version for 1.3.8a.

I followed the uninstall directions and removed the Subscription manager from admin menu, restored all the core files and deleted the NLS only files.

I am now getting this error when I access admin>Tools>Send email:

1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE email_format != 'NONE' and confirmed = 1 and (customers_i
in:
[SELECT email_address as customers_email_address FROM WHERE email_format != 'NONE' and confirmed = 1 and (customers_id IS NULL or customers_id = 0) order by email_address ]
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 was aware that the remove option in Subscription manager would drop the subscribers database. I have no customers currently so I thought that would be fine, but when I create new customers (newsletter/customers) I still see this error.

did I do something wrong?:cry:

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

19 Dec 2007, 9:09 PM
#604
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Post #604 by cjpinder

dharma:

I removed NLS 2.0.6 on my 1.3.7 Zen Cart, to ease my upgrade to 1.3.8a and await a new tested version for 1.3.8a.
My original estimate of a couple of days has slipped somewhat :blush:. I love deadlines. I love the whooshing noise they make as they go by.

dharma:

I followed the uninstall directions and removed the Subscription manager from admin menu, restored all the core files and deleted the NLS only files.
I am now getting this error when I access admin>Tools>Send email:
It looks like you have missed one of the core files when you were returning them to their original state. You need to double check the files NLS overwrites. Doing the upgrade to v1.38 will give you a clean set of files anyway so you could just do that.

Regards,
Christian.

19 Dec 2007, 10:48 PM
#605
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #605 by dharma

Thanks for your reply! and thank you for working on this essential mod!

I took your suggestion and double checked the core overwrites that v2.0.6 overwrote and made sure I did successfully replace them with original 1.3.7 core files:

admin/index.php
admin/customers.php
includes/functions/function_email.php
includes/functions/audience.php
includes/modules/pages/account_edit/header_php.php
includes/modules/pages/account_newsletters/header_php.php
includes/modules/pages/unsubscribe/header_php.php

sadly the files are correct, and I still have that error.

I know nothing about MySQL databases, but I compared the current MySql database to my backed up copy and see there is indeed a table missing called subscribe.

In the uninstall directions this is stated :

Note that the remove option also DELETES/DROPS the subscribers database, so make
sure you have a backup of that table before you remove.

Which I thought meant it just drop the customers database /info...and go back to regular ZC newsletter biz.....as I have no customers I was not concerned about putting a table back.....but I guess this table is removed (completely, not just customers) and not put back? I think ZC loses functionally::oops:

Again I am guessing.

but this table is now missing from my database:

-- Table structure for table subscribers

CREATE TABLE subscribers (
subscriber_id int(11) NOT NULL auto_increment,
customers_id int(11) default NULL,
email_address varchar(96) NOT NULL default '',
email_format varchar(4) NOT NULL default 'TEXT',
confirmed varchar(8) default NULL,
subscribed_date date NOT NULL default '0000-00-00',
PRIMARY KEY (subscriber_id),
UNIQUE KEY email_address (email_address)
) TYPE=MyISAM AUTO_INCREMENT=63 ;

--
-- Dumping data for table subscribers

INSERT INTO subscribers (subscriber_id, customers_id, email_address, email_format, confirmed, subscribed_date) VALUES
(2, 8, '[email protected]', 'TEXT', NULL, '2007-04-15'),
(14, NULL, '[email protected]', 'TEXT', 'YXZGdj', '2007-04-15'),
(5, NULL, '[email protected]', 'TEXT', '1', '2007-04-15'),

and so on...


--

I am going to muddle through my backed up site/Mysql and try to merge the NLS 2.06 into the upgrade of 1.3.8a if it goes in ok, disable it and wait for the upgraded NLS for 1.3.8a

What do you think?:lookaroun

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

19 Dec 2007, 11:26 PM
#606
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Post #606 by cjpinder

dharma:

I took your suggestion and double checked the core overwrites that v2.0.6 overwrote and made sure I did successfully replace them with original 1.3.7 core files:

admin/index.php
admin/customers.php
includes/functions/function_email.php
includes/functions/audience.php
includes/modules/pages/account_edit/header_php.php
includes/modules/pages/account_newsletters/header_php.php
includes/modules/pages/unsubscribe/header_php.php

There is one more core file which has an override on it...
includes/modules/YOUR_TEMPLATE/create_account.php
...where YOUR_TEMPLATE should be replaced with the name of your template. If that file exists then take a copy of it (just in case) and then delete it.

The 'subscribers' table is not part of a standard Zen Cart installation, it is used purely for NLS so without NLS you do not need the 'subscribers' table. After checking the file mentioned above I would also do a search through all the .php files for the phrase TABLE_SUBSCRIBERS . When NLS is completely removed TABLE_SUBSCRIBERS should not appear anywhere.

Hope that helps.

Regards,
Christian.

20 Dec 2007, 3:14 PM
#607
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #607 by dharma

Thanks again Christian, for your speedy help!

I did as you suggested and searched for any left over NLS files..... all NLS files are indeed completely gone from my file set. I still get the error when I access admin>tools>send email.

I searched my database for the error that I mentioned before and found it in the query_builder table as the last line under dumping data for query_builder>

(8, 'email,newsletters', 'Newsletter-only Subscribers', 'Returns email address of all confirmed Newsletter-Only subscribers.', 'SELECT email_address as customers_email_address FROM TABLE_SUBSCRIBERS WHERE email_format != ''NONE'' and confirmed = 1 and (customers_id IS NULL or customers_id = 0) order by email_address', '');

Again I do not know what I am doing, but felt I had nothing to lose so I went into my phpAdmin found this line and deleted it out of database.

I do not have the error anymore and the cart seems ok, I did notice however, under admin>tools>send email : in the drop down (send to) customer menu there is a "Newsletter subscribers" option, which I don't remember if ZC had before I installed NLS 2.0.6.

Anyway, the whole cart may go up in flames now, but I wanted to trouble shoot this error, if I need to uninstall NLS again.

Did I do the correct thing?


Also: I am having trouble merging NLS 2.0.6 into 1.3.8a. I can clearly see the code for NLS when its commented: ```php
// BEGIN newsletter_subscribe mod 3/3 .................// END newsletter_subscribe mod 3/3


NLS? ex: 

admin>customers>line 882 : ```php
    echo zen_draw_hidden_field('customers_newsletter');

so...

Would it be possible to upgrade to my ZC to 1.3.8a leaving out all the NLS 2.0.6 files, but keeping the NLS Subscription manger/'subscribers' table in the database, until the NLS 1.3.8a files are available for install?

I am looking for the easiest way to upgrade without messing up my site/database, due to my inexperience.

Again thank you for your help....

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

21 Dec 2007, 5:22 PM
#608
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #608 by dharma

I just compared the new version of NLS 2.0.9 to my old v2.0.6 and noticed a typo that was mentioned in a previous forum , not sure if it should be carried over into the next version or not, but I thought I should mention it:

http://www.zen-cart.com/forum/showpost.php?p=407080&postcount=509

require($template->get_template_dir('tpl_subscribe_header',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_subscribe_header.php');  
 require($template->get_template_dir('tpl_subscribe_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_subscribe_header.php');  

hope this helps....

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

24 Dec 2007, 3:42 PM
#609
ekles avatar

ekles

New Zenner

Join Date:
Aug 2005
Posts:
73
Plugin Contributions:
0

Post #609 by ekles

I find the newletter only subscrption quite useful but it does have limitations with email control such as bounces. As such we use a product written for us for this purpose. We have a sizable database with an email going out every 3-4 weeks. As a result we get 50-150 bounces each time and when we get 3 in a row we regard these addresses as dead. Any ideas on a bulk delete of these addresses using PHP or SQL (preference is SQL)? A normal delete list is around 100 addresses.

Making sure we get the cost of freight back will drive us all mad at some stage.

28 Dec 2007, 2:07 AM
#610
roosterd avatar

roosterd

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Post #610 by roosterd

GREAT MOD.

I was wondering how to go about adding to this mod. I want to add 3 or 4 check boxes that will allow the subscriber to choose which newsletter to subscribe to.

Such as
Check Box A = Newsletters regarding new products
Check Box B = Newsletters regarding outdated products, or discontinued products
Check Box C = Newsletters regarding the company only
Check Box D = Newsletters regarding products in development

Any ideas on going about this?

Thanks
Rooster!

1 Jan 2008, 7:02 PM
#611
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #611 by dharma

Im still testing this mod...

currently if someone wants to unsubscribe they go to the /index.php?main_page=unsubscribe page

They enter their email address and are unsubscribed.

But this page gives everyone the ability to delete any email address they enter :( off the sites NLS list

anyway to tighten this up? so its possible to delete their email and only their email address (perhaps a php generated link in an email sent to them? )

ex:

https://YOURSITE.com/index.php?action=unsubscribe&main_page=unsubscribe&addr=delete_only_my_email%40yoursite.com&x=34&y=6

maybe this more of a request for an future feature.

any other way around this?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

3 Jan 2008, 8:49 PM
#612
jj_boja avatar

jj_boja

New Zenner

Join Date:
Dec 2007
Posts:
7
Plugin Contributions:
0

Post #612 by jj_boja

Hey All,

Just checking in to see if anyone successfully integrated this into ZenCart v1.3.8?

Thanks, JJ

3 Jan 2008, 8:54 PM
#613
bandora avatar

bandora

New Zenner

Join Date:
Oct 2007
Location:
Miami, FL
Posts:
29
Plugin Contributions:
0

Post #613 by bandora

JJ_Boja:

Hey All,

Just checking in to see if anyone successfully integrated this into ZenCart v1.3.8?

Thanks, JJ

I've been using it on v1.3.8a without problems.

3 Jan 2008, 8:58 PM
#614
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #614 by delia

don't believe anyone has but I'm available for the work. I'm waiting for one of my customers who has this mod to get the site upgrade so I can be paid. Nobody needs it or is asking for it yet.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

4 Jan 2008, 3:44 AM
#615
littleturtlemama avatar

littleturtlemama

New Zenner

Join Date:
Mar 2007
Posts:
37
Plugin Contributions:
0

Post #615 by littleturtlemama

excellent mod, thanks for the hard work!

I have one question though - I've installed the mod and it's working perfectly. however, it's added the word "subscribe" to my site title and at the top of the main content area. How do I get rid of that?! (see site here: http://www.littleturtleknits.com/zencart/ )

7 Jan 2008, 3:13 AM
#616
jj_boja avatar

jj_boja

New Zenner

Join Date:
Dec 2007
Posts:
7
Plugin Contributions:
0

Post #616 by jj_boja

delia:

don't believe anyone has but I'm available for the work. I'm waiting for one of my customers who has this mod to get the site upgrade so I can be paid. Nobody needs it or is asking for it yet.

I need it, for my own site, and don't have enough PHP/Zen Cart knowldge/experience to integrate it, and worry a lot about making problems for my working site. What would it take for you to do the real/sure thing Zen Cart v1.3.8 upgrade and then make it available to all? Maybe myself and others in need will be able to PayPal you something reasonable for your troubles?

JJ

7 Jan 2008, 3:44 AM
#617
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #617 by delia

I don't know how much time it will take. As it is, there is one bug that needs to be fixed, too. It could only be $100 - could be more. I might even have time this week to do it. If I have time on my hands, I could get it done and after receiving enough money to cover time (then releasing it to those who pay something) - then upload it as a free contribution.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

7 Jan 2008, 6:18 AM
#618
stevefriedman71 avatar

stevefriedman71

Zen Follower

Join Date:
Sep 2006
Posts:
269
Plugin Contributions:
0

Post #618 by stevefriedman71

jeez... you're greedy... i thought we all try to make zencart better...

7 Jan 2008, 6:58 AM
#619
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Post #619 by delia

not greedy - right now we're in dire financial straits due to my husband's medical problems and his disability has been denied and we can't afford the health insurance.

I do what I can for zen cart - which has included several contributions - including one this morning.

Never assume you know what's going on - life isn't that simple.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

8 Jan 2008, 1:02 PM
#620
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Post #620 by cjpinder

JJ_Boja:

Just checking in to see if anyone successfully integrated this into ZenCart v1.3.8?
It is on my 'to do' list for this week to get a ZC v1.3.8 compatible version of the mod up. I was intending to have it up already but been very busy. Should be up by the end of the week though.

Regards,
Christian.