Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter module v02


jsiu

Recommended Posts

hello,

 

To anyone who use this module.

I don't want to use the manual update table page to merge datas of customers table to subscribers table, so I tried to add some lines in customers.php page when modifying the subscribed to newsletter status.

That worked. But when I tried to change the newsletters_subscribers_view.php page to do the same in customers table, it doesn't work.

 

My question is "why" ?

 

If you want to try yourself :

find in customers.php page :

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . tep_db_input($customers_id) . "'");

 

Add this line under the one just above :

tep_db_query("update " . TABLE_SUBSCRIBERS . " set customers_newsletter = '" . tep_db_input($customers_newsletter) . "' where customers_id = '" . tep_db_input($customers_id) . "'");

 

That's the working part. If you want to test, change the subscribe to newsletter status and it will automatically be changed in newsletters_subscribers_view.php to.

 

Find in newsletters_subscribers_view.php :

tep_db_perform(TABLE_SUBSCRIBERS, $sql_data_array, 'update', "subscribers_id = '" . tep_db_input($subscribers_id) . "'");

 

Add this line just under the one above :

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_newsletter = '" . tep_db_input($customers_newsletter) . "' where customers_id = '" . tep_db_input($customers_id) . "'");

 

It doesn't work on my site. What's wrong ?

 

Thanks for help.

Link to comment
Share on other sites

Still didn't found any answer to previous problem but found how to resolve the search query that doesn't work on newsletters_subscribers_view.php :

 

Find :

$subscribers_query_raw = "select c.subscribers_id, c.subscribers_lastname, c.subscribers_firstname, c.customers_newsletter, c.subscribers_blacklist, c.subscribers_email_address, c.subscribers_country_id from " . TABLE_SUBSCRIBERS . " c order by $order";

 

And replace by :

$subscribers_query_raw = "select c.subscribers_id, c.subscribers_lastname, c.subscribers_firstname, c.customers_newsletter, c.subscribers_blacklist, c.subscribers_email_address, c.subscribers_country_id from " . TABLE_SUBSCRIBERS . " c " . $search . " order by $order";

 

Help on previous question is still welcome.

Link to comment
Share on other sites

  • 4 weeks later...

How about if the subscribe/unsubscribe link is not available when the customer is creating an account.

The newsletter contribution could then be used as a normal navigation link as it is with most websites.

No need to update/merge tables then as all people that sign up will have done so to the correct table.

I think this makes for less boxes and selections at the checkout stage aswell.

Link to comment
Share on other sites

  • 2 weeks later...

I'm having some trouble with the newsletter contribution perhaps someone could help.

 

Main problem is on registering a new member I get the following error :-

 

Warning: Cannot add header information - headers already sent by (output started at ...root.../includes/classes/snoopy1.class.php:2104) in ...root.../newsletters_subscribe.php on line 73

 

I still get a correct entry i the mailing list and I can unsubscribe OK (although the subscription centre page stays there without notification that the email has been removed)

 

2 other issues that may be brought out by the failure is

 

1 - I can register the same email twice - is this normally prevented?

2 - I can't see any way of getting to the emailing options that the recipient checked in the preferences. - how do you get to these?

 

Cheers

Kenny

If you learn more than you forget then that's a good thing.

Link to comment
Share on other sites

  • 2 months later...

Hi Kenny

I'd the same problem as yours:

Warning: Cannot add header information - headers already sent by (output started at ...root.../includes/classes/snoopy1.class.php:2104) in ...root.../newsletters_subscribe.php on line 73

 

The solution is to do as the following:

1) Delete the file: "catalog/includes/classes/snoopy1.class.php"

2) mark out line 3 in the file "catalog/newsletters_subscribe.php"

It should look like this:

//include "includes/classes/snoopy1.class.php";

 

Good luck :-)

 

/Jes

Link to comment
Share on other sites

  • 4 months later...

Thanks Jes for the reply.

 

I had the same problem with the Newsletter module and following your guide helped. But what am I actually doing when deleteing the includes/classes/snoopy1.class.php?

 

Or in other words... what does that file do?

 

Best regards,

S?ren Beck

Poitoy

Link to comment
Share on other sites

  • 1 month later...

In the newsletter subscription center, how can I get rid of the 5 choices.

I know very little PhP. I went to catalog/subscription_center.php and tried to remove the code referring to the 5 choices, but then I get errors.

 

All I want to have is:

 

Receive Newsletter Yes or No

 

eMail Type HTML or Text

 

Any help would be much appreciated.

 

Thanks in advance

Link to comment
Share on other sites

Just a few issues:

It is a pain to change all the text from that other company to yours, it should be in the database or something so you can change it in the admin part easy.

 

I can't get it to send html email it shows all the tags

 

if you use the same email address as an account that is on there it will overwright the user that was first

 

It really wants to much info, if you want peeps to just be able to sign up real fast then all you need is a name and email address, if they are going to do all the other stuff they may as well open an account.

 

Also, when I click on a name of a person that is on the list in the admin part it defaults to the last user and won't go down so I can edit the user that I clicked on.

Link to comment
Share on other sites

I am having a few problems with this cotribution also.

 

I have found that if you click on the I for information at the end of the name that you can change to the name that way, this then allows an edit.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

In the newsletter subscription center, how can I get rid of the 5 choices.

I know very little PhP. I went to catalog/subscription_center.php and tried to remove the code referring to the 5 choices, but then I get errors.

 

I left 2 of the five choices that you want to get rid of. All I did was a lot of commenting out of the code. You can get my catalog/subscription_center.php and look it over, and carry the commenting on for the other 2 choices. I put the file in a .zip and you can get it here: Commented File

Link to comment
Share on other sites

Headers and Footers --------I'm not able to attach the nice headers and footers to the newsletters, but other than that the newsletters go out fine. I have banged around in admin with Newsletter Default and Header/Footer Info but there seems no way to attach them after they are created.

Link to comment
Share on other sites

In the newsletter subscription center, how can I get rid of the 5 choices.

I know very little PhP. I went to catalog/subscription_center.php and tried to remove the code referring to the 5 choices, but then I get errors.

 

I left 2 of the five choices that you want to get rid of. All I did was a lot of commenting out of the code. You can get my catalog/subscription_center.php and look it over, and carry the commenting on for the other 2 choices. I put the file in a .zip and you can get it here: Commented File

I like it.

 

 

Thanks

Best Regards

Link to comment
Share on other sites

Reply to myself:

Headers and Footers --------I'm not able to attach the nice headers and footers to the newsletters, but other than that the newsletters go out fine. I have banged around in admin with Newsletter Default and Header/Footer Info but there seems no way to attach them after they are created.

 

It was all functioning, but I couldn't figure out how to coordinate Newsletter Admin and Header/Footer Infos. The java popup help file for that was missing, and that might have explained it. It's just a matter of creating the newsletter body in Newsletter Admin and then going to Headers/Footers and associating footers with the newsletter by title.

 

For me I am ready to call Newsletter Module v0.21 complete in my MS2, and thanks to using all the little fixes found in these forums I like it.

Link to comment
Share on other sites

Hey,

 

Been trying to install this contrib for a couple of days now. been editing alot of code, alot of it needed to be removed (like the interest options).

 

Also I couldn?t get the unsubscription links to work (the ones at the bottom of the email). When clicking them it didnt fill in the email adress in the subscription center as it was supposed to. So edited out those aswell.

 

Now I got a couple of problems left which I have no solution to.

 

1. Clicking the subscribers in the admin doesn?t work, it just doesn?t mark the user. It stays on the top one. Entering userid manually in the url works.

 

Read some solution to this, changing "onclick" to "onmouseclick" in the code, but this didn?t work. Anyone got it working?

 

2. The headers and footers are a mess. I added a default footer and thought that it would add this footer to the newsletter if no other option was chosen, well it didn?t. Now when I create a new newsletter it also creates a new header footer with "Dear" as a greeting. So I have to go back and change to my own header footer.

 

3. The unsubscription info included in the footer of the email sent out includes an unsubscribe link, which doesnt work. So I removed this info from unsubscribe 1. However, it still includes the users email. Not sure where to edit this out, anyone got any ideas?

 

Would appreciate any advice on this.

 

Thanks,

 

Erik

Link to comment
Share on other sites

Also I couldn?t get the unsubscription links to work (the ones at the bottom of the email). When clicking them it didn't fill in the email address in the subscription center as it was supposed to. So edited out those aswell.

It would be nice to get the links working when welcoming a subscriber, but like you I found that they didn't. Like another poster I could find no unsubscribe.php. Here is what I did on that. I pointed them to the page where the customer gives his address to access the subscription center. In catalog/includes/languages/english/newsletters.php at around line 31 I put:

define('CLOSING_BLOCK1', 'This email was sent to:');

define('CLOSING_BLOCK2', "\n" . 'at your request, by MY STORE.' . "\n" .  'Visit our Subscription Center to edit your interests at: ' . HTTP_SERVER . DIR_WS_CATALOG . 'subscription_center.php?view&email=');

define('CLOSING_BLOCK3', "\n\n" . 'or unsubscribe at: ' . HTTP_SERVER . DIR_WS_CATALOG . 'subscription_center.php?email=');

this looks good for the two links on welcome email.

Link to comment
Share on other sites

1. Clicking the subscribers in the admin doesn?t work, it just doesn?t mark the user. It stays on the top one. Entering userid manually in the url works.

 

Read some solution to this, changing "onclick" to "onmouseclick" in the code, but this didn?t work. Anyone got it working?

 

I gave up on the little green and red radio buttons which could be nice if you were making a lot of changes. Instead I mouse to the end of the line where the circled "i" is and click. Then the edit is easy at the bottom of the page that comes up.

 

 

2. The headers and footers are a mess. I added a default footer and thought that it would add this footer to the newsletter if no other option was chosen, well it didn?t. Now when I create a new newsletter it also creates a new header footer with "Dear" as a greeting. So I have to go back and change to my own header footer.

 

Yep this drove me nuts too. I just played with it till I got my own default header in "Header/Footer Infos". It seems that "Default Header" was only useful for copy and paste to "Header?Footer Info". I think at one point I was in the database with mySQL editing. Wish I could be more helpful, but it is a blur.

 

3. The unsubscription info included in the footer of the email sent out includes an unsubscribe link, which doesnt work. So I removed this info from unsubscribe 1. However, it still includes the users email. Not sure where to edit this out, anyone got any ideas?

 

Try using this as a link:

UNSUBSCRIBE INFO: If you wish to unsubscribe from our newsletter, please visit the link:

 

http://www.yourdomain.com/catalog/subscrip...nter.php?email=

It works for me. Edited by jobjonah
Link to comment
Share on other sites

  • 4 weeks later...

Spent 2 days editing code, then looked into the forums to find a lot of answers here.

Here is something that might be usefull:

in 'subscribers admin' menu to select the row by clicking on the row and not on the 'i' icon

in newsletter_subscribers_view.php find line (477)

 

 echo '          <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_NEWSLETTERS_SUBSCRIBERS_VIEW, tep_get_all_get_params(array('cID')) . 'cID=' . $cInfo->subscribers_id) . '\'">' . "\n";

and change into

<tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_NEWSLETTERS_SUBSCRIBERS_VIEW, tep_get_all_get_params(array('cID')) . 'cID=' . $subscribers['subscribers_id']) . '\'">' . "\n";

 

 

Happy New Year Everybody

Link to comment
Share on other sites

I noticed that when when a customer wants to resubscribe after unsubscribing (i.e. his email address is allready in the newsletter table) his newsletter status doesn't change from 0 to 1. Here is what you gotta add to the code

 

newsletters_subscribe.php line 29

after word set insert customers_newsletter = 1 ,

Link to comment
Share on other sites

After changing a lot of code I have a tiny problem - customers don't receive newsletter :( . When pushing "Send" button in the newsletter admin everything looks like the newsletter was sent but emails don't reach destination.

 

Did anyone have the same problem or I did something wrong

Link to comment
Share on other sites

  • 3 months later...

Hi. I'm having trouble with email headers. When emails are sent, I get "Content-Type: text/plain; charset="iso-8859-1"" duplicated 10, 20, or even 30+ times in each email's header info. The only thing I can think of is that "$mimemessage = new email(array(..." is being added to itself each time an email is sent and the next one gets built.

 

Any ideas???

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

Does anyone know about this repeating email header information in the Newsletter module.?

 

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

 

This is repeated in the headers of the email newsletters for the amount of subscribers that you have.

 

Since I so far have 200 subscribers the email header information is really really big.

 

I don't know if this has anything to do with the Newsletter module itself, and it may be osC related only in the email.php or mime.php.

 

There are so many arrays that could be causing this I don't know where to start.

 

Thanks

Aaron

Aaron Dwyer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...