Zen Cart Logo
Forums / All Other Contributions/Addons / Newsletter-Only Subscriptions for v1.3x

Newsletter-Only Subscriptions for v1.3x

Views: 295,597

Results 141 to 160 of 1,165
29 Jun 2006, 10:24 PM
#141
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Newsletter-Only Subscriptions for v1.3x

Yes, actually it does.

Looks like on one (or more) of the statements I'm doing "insert into query_builder ...yada yada' where it should be:

"insert into " . TABLE_QUERY_BUILDER . " ..... "

I here's a replacement file. This goes in:
/admin/includes/functions/extra_functions/subscription_manager.php

-Ng_

29 Jun 2006, 10:28 PM
#142
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

Here is the pages/subscribe/header_php.php file with those changes mentioned in a prior post.

I will incorporate all of these later into a patch.

remember to backup prior to installing.

-Ng_

29 Jun 2006, 10:32 PM
#143
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

oh ho! And that did the trick - no errors on the recent "update" and the test email group is now availible in the emal tool :)

You're wonderful :D

29 Jun 2006, 10:42 PM
#144
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

Good. I'll build another release and/or get those patches on my site tonight.

30 Jun 2006, 6:59 AM
#145
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

I am running the old version of subscribe (1.1 I think it is) on Zen 1.2.7
I think the SQL tables are the same on the new version, so I am going to ask my question here.
In the admin panel->Tools->Subscription Removal I find some addresses are duplicated. I am fairly sure that those addresses are the accounts that existed when I installed the module. I also suspect that I caused the trouble. It was a while back, but I think I ran into a bit of trouble when I ran the initial SQL query and ended up running it twice or some such ignorant thing.
Looking in phpmyadmin I find 2 tables, a customers table and a subscribers table. The offending customers are, indeed, listed in both tables. In the customers table they are simply listed as being subscribed to the newsletter by way of a "1" in the Newsletter field. In the subscribers table those same customers have 2 separate entries in which the customers_id is the same in each entry, but the subscriber_id varies, a lower number (presumably the original) and a higher number (presumably a subsequently created value.)
I could simply sort the table by email address and delete half of the entries, but I wanted to be sure I am not aggravating the problem further. Which entry should I retain, the lower subscriber_id value or the higher, or no matter?
Is there a simple SQL query that I can use to effect the cleanup? You may have gleaned that I am SQL illiterate (just another livin'-on-the-edge Zenner playing w/ danger she knows not of...)

Thanks for any help, and feel free to kick me off this thread if the new version has taking a path so different as to make my post irrelevant here, :D

Best,
Audra

30 Jun 2006, 11:32 AM
#146
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

Audra,

Let me rephrase so as not to misunderstand. By duplicate you are meaning one in the customer table and one in the subscriber table, correct?

This is not an error-you see both contribs keep ZenCarts structure and method intact.
So customers have an entry in both tables, while news-only subscribers are only found in the subscriber table.

Are you experiencing other issues that caused you to look into this?

-Ng_

30 Jun 2006, 12:57 PM
#147
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

On my site is a patch comprised of the files above to address the update sql errors and subscriber notification glitch.

I'll be releasing the manager patch tonight/tomorrow.

-Ng_

30 Jun 2006, 3:39 PM
#148
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

No, there are two entries for these customers in the subscriber table as well as the one entry in the customer table.

30 Jun 2006, 4:37 PM
#149
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

audradh:

No, there are two entries for these customers in the subscriber table as well as the one entry in the customer table.

Okay, you say you aren't too sql-savvy, but can you use phpMyAdmin? If so, this is the easiest way to fix this. We're going to get rid of the customers and re-insert them.

First, check and make sure you still have the customer transfer file that came with that contribution called subscribe_transfer_data.php
It's probably in your root directory, altho directions might have had you put it in admin.

Select the subscribers table. Click on the export tab. Check the 'export data' box and 'complete inserts' (you can leave others as what they are). Export all data and save as a .sql file on your computer. (we're making a backup of the data, just in case.

Verify that you do indeed have a backup. :)

Now select the [sql] tab and enter this query:
SELECT FROM subscribers WHERE customer_id NOT NULL
(I'm working from memory. It might be IS NOT NULL or <> NULL)

What should come up is a list of all the customer accounts. You can look at the customers_id column to be sure. Click on that to sort by it.

Now you have a choice depending on how many customers you have.
If you don't have too many, you can check the box on each duplicate record (so one is checked, one is not), then at the bottom of the list you should see the option to delete the checked boxes.

If you have too many, first verify that your query only brought up customer accounts, then change the SELECT to DELETE and run it. This will delete ALL customer info in the subscribers table. If you do this then you need to run the subscribe_transfer_data.php program again (just point your browser to that page).

-Ng_

2 Jul 2006, 5:43 AM
#150
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

i tried to send my newsletter out, using "all newsletter subscribers" and I got the following error:

Please wait .. sending emails ..

Please do not interrupt this process!
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 '[email protected]'' at line 1
in:
[SELECT count(*) as count FROM zen_subscribers WHERE email_address = '[email protected]'[email protected]']
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.

:cry: I just don't know what to do next to fix it, actually I should say I don't know what to do first to fix it.

2 Jul 2006, 5:55 AM
#151
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

:smartass: See I just needed to reach the end of my rope and read my own post a couple of times and the problem jumped out at me. I just used phpmyadmin and fixed the problem with that particular email address, which happened to be mine, and poof magic happens and newsletters are bein' sent.

2 Jul 2006, 5:56 AM
#152
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

Let me check it out...

2 Jul 2006, 6:01 AM
#153
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

barco57:

:smartass: See I just needed to reach the end of my rope and read my own post a couple of times and the problem jumped out at me. I just used phpmyadmin and fixed the problem with that particular email address, which happened to be mine, and poof magic happens and newsletters are bein' sent.
grin... often happens :)

Was it the quotes? or doubling? That's what jumped out at me when I saw it but I wanted to be sure before answering.

-Ng_

(btw...I've decided to finish up the revision and release tonight rather than delay until monday. It'll be up soon).

2 Jul 2006, 6:01 AM
#154
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

what I don't know is how the email address got screwed up in the first place. None of the other email addresses in the list have any problems.

It was the doubling.

2 Jul 2006, 6:17 AM
#155
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

I have another question about the database

when browsing zen_subscribers I noted that some of the email address under customer id have a number, but when you look at the subscribe date it shows 0000-00-00. The other email addresses have null for the customer id and have a filled out subscriber date. Do I assume correctly that the customers with an id and no date signed up for the newsletter when creating an account and the others signed up for the newsletter only? and is this the correct behavior for this mod?

2 Jul 2006, 6:27 AM
#156
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

barco57:

when browsing zen_subscribers I noted that some of the email address under customer id have a number, but when you look at the subscribe date it shows 0000-00-00. The other email addresses have null for the customer id and have a filled out subscriber date. Do I assume correctly that the customers with an id and no date signed up for the newsletter when creating an account and the others signed up for the newsletter only? and is this the correct behavior for this mod?
Yes, I don't transfer over the customer account creation date or when the subscription was made/changed (tho I easily could if you'd like that) for customers.

News-only subscribers have a subscribed_date, but no customers_id (as they are not a customer). When/if they become one, then it gets merged and updated.

-Ng_

2 Jul 2006, 6:38 AM
#157
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

I don't see a reason at this time to make anychanges to this behavior. I just wanted to check and make sure I understood what was going on. Every little bit of information I gather on zen-cart, its mods and the interaction with the database helps me sort out the little problems as they arise without having to have a panic attack everytime something doesn't work out quite right. Thanks.

2 Jul 2006, 9:11 AM
#158
notgoddess avatar

notgoddess

Zen Follower

Join Date:
Jan 2005
Location:
Waukee, Iowa
Posts:
206
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

This is mainly a BugFix release, but it also enhances the subscription manager page in admin.

It fixes the known flaws in 2.0.2 and fixes an inadvertant error I introduced with the 2.0.3 patch file.

No database upgrade is needed-you can just overwrite the files. To overwrite just the changed files, see the changelog for a list.

Submitted to the downloads section, also available on my site: http://www.notgoddess.com/scripts/newsletter-subscribe

As ever, report issues and I'll address them promptly. I will be afk July 2 and part of the third.

-Ng_

2 Jul 2006, 3:20 PM
#159
kookiewookie avatar

kookiewookie

New Zenner

Join Date:
Jun 2006
Posts:
75
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

great! i updated all files. All seems working fine now except one strange thing

When i go to Subscription Manager and sent a email to a newsletter only subscr. it sents the email fine.
BUT when i do select: Newsletter only Subscr. from the newslettermanager i does not send the email for there is a error: No recipient addresses found in header .

Sending to ALL is fine as the others.. except this one does not seem to work correctly.

What should i double check?? some one a solution maybe?

2 Jul 2006, 7:57 PM
#160
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Newsletter-Only Subscriptions for v1.3x

NotGoddess:

Okay, you say you aren't too sql-savvy, but can you use phpMyAdmin? If so, this is the easiest way to fix this. ...

Just wanted to say thanks Ng! I manually deleted the dups by browsing the table in phpmyadmin as we discussed via pm. All is happy :yes: :D

Best,
Audra