OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Simple Visitor Newsletter
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Contribution Development
central50
I have been looking for a contrib that simply adds an e-mail address that a visitor supplies to receive newsletters. The contribs that I have found are so complicated for the fact that I do not see why, plus the added fact that they have warnings of bad injections, etc.

I am just going to create a contrib that has the visitor add their e-mail via a info box into a separate table. If and when that visitor creates an account, it will check that table if the e-mail exists. If it does, it will delete it out of that visitor table so they do not receive multiple e-mails of one newsletter.

When you go to send a newsletter, it will send e-mails from both the customer table as well as the visitor table. Maybe even write up something to show all the visitor e-mails, and the capability to delete one or more if you wish.

A simple mod to do a simple task.

Is there anything I should know on why a simple contrib has not been written like this? Is there something around that does the same thing I am missing?
-Jon
central50
Okay well its published:
http://www.oscommerce.com/community/contri...arch,newsletter
h2woo
This is a welcome contribution. I am going to have it installed and check it out.

Richie
dcross02
I've got this installed -- thanks for the needed contribution. However, I can't get it to function with Simple Template System (STS). It shows up, but when I enter an email address, it just gives me an empty template with some of the STS codes showing (i.e. $categorybox, $informationbox). When I turn STS off, it works fine.

I've added this to sts_user_code.php:

$sts->start_capture();
require(DIR_WS_BOXES . 'visitoremail.php');
$sts->stop_capture('visitoremailbox', 'box');

Any ideas?



QUOTE (central50 @ Jun 6 2007, 07:45 AM) *
I have been looking for a contrib that simply adds an e-mail address that a visitor supplies to receive newsletters. The contribs that I have found are so complicated for the fact that I do not see why, plus the added fact that they have warnings of bad injections, etc.

I am just going to create a contrib that has the visitor add their e-mail via a info box into a separate table. If and when that visitor creates an account, it will check that table if the e-mail exists. If it does, it will delete it out of that visitor table so they do not receive multiple e-mails of one newsletter.

When you go to send a newsletter, it will send e-mails from both the customer table as well as the visitor table. Maybe even write up something to show all the visitor e-mails, and the capability to delete one or more if you wish.

A simple mod to do a simple task.

Is there anything I should know on why a simple contrib has not been written like this? Is there something around that does the same thing I am missing?
-Jon
swtnhpy
You must also add an entry into new custom boxes in sts_display_output.php

I have a different issue with this contrib. Once you enter an email address and push subscribe, it goes to visitoremail.php?action=process with a blank page. The email address is entered into the database just fine. Then you go to send a newsletter, I get this

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/admin/public_html/admin/includes/functions/database.php on line 99

This is my line 99
return mysql_fetch_array($db_query, MYSQL_ASSOC);
Blaine
QUOTE (central50 @ Jun 6 2007, 02:45 PM) *
I have been looking for a contrib that simply adds an e-mail address that a visitor supplies to receive newsletters. The contribs that I have found are so complicated for the fact that I do not see why, plus the added fact that they have warnings of bad injections, etc.

I am just going to create a contrib that has the visitor add their e-mail via a info box into a separate table. If and when that visitor creates an account, it will check that table if the e-mail exists. If it does, it will delete it out of that visitor table so they do not receive multiple e-mails of one newsletter.

When you go to send a newsletter, it will send e-mails from both the customer table as well as the visitor table. Maybe even write up something to show all the visitor e-mails, and the capability to delete one or more if you wish.

A simple mod to do a simple task.

Is there anything I should know on why a simple contrib has not been written like this? Is there something around that does the same thing I am missing?
-Jon


I am trying to install this but when I get to step 6 in the install.txt I am not sure which file I am supposed to add the include(DIR_WS_BOXES . 'visitoremail.php'); into. Thanks for a needed contrib. Blaine
swtnhpy
You can add this where you want the box to show up. ie; column_right, column_left, footer, etc and these files are located in catalog/includes/...
runweb
I installed the last Version but:

=>I registered as a new newsletter subscriber
=> System tells me, that my email adress ist added

Problems
=> Does a subscriber not receive an email to activate his newsletter subscription (double subscribe for secure ?)
=> Tabel "customers_temp" is empty ? Where is the subscribed email stored in ???

Admin gets an information that there is a new subscriber - but where can admin modify newsletter mebers list or just see it ?
runweb
The second thing is:
Visitors can only book the newsletter but not disable it by themselves...

Admin has no management functions to manage (insert/edti/delete) subscribers....

I think there is still some work to do with that contrib ?
neiro
I installed the contrib but the newsletter bulk module is not working. I can send out my newsletter using the newsletter module but the for some reason that I cant figure out the newsletter bulk module is not sending any emails out.

any help would be greatly appreciated.

thx
Zahoor
I am using this contribution, Newsletter Unsubscirbe, together with this contribution and but without bulk-mailer. And i have at the moment managed to come to a point where visitor receive a link in his/her e-mail which can be used to unsubscribe. Problem I am now facing is this that the query I am carry out, listed below:

CODE
tep_db_query("delete from " . TABLE_VISITOR . " where convert ('" . TABLE_VISITOR . "''"."''"email"' using utf8) = '" . $email_to_unsubscribe . "'");


Gives me folloing error:

Parse error: syntax error, unexpected T_STRING in unsubscribe_done.php on line 76


I feel I am really close, but can not figure out whats wrong with that query. If someone could please have a loot at it and correct it for me.

Thanks in advance.
Zahoor
I found the problem and have fixed it now!
imqqmi
QUOTE (neiro @ Oct 26 2007, 02:55 AM) *
I installed the contrib but the newsletter bulk module is not working. I can send out my newsletter using the newsletter module but the for some reason that I cant figure out the newsletter bulk module is not sending any emails out.

any help would be greatly appreciated.

thx


I too am facing this problem. I've double checked the installation and everything is as it should be. I got an error saying that oscom.table_customers_temp doesn't exist. I've added the table and doesn't complain about it anymore. But no actual mails are being sent.
TIA
imqqmi
QUOTE (imqqmi @ Nov 22 2007, 03:55 PM) *
I too am facing this problem. I've double checked the installation and everything is as it should be. I got an error saying that oscom.table_customers_temp doesn't exist. I've added the table and doesn't complain about it anymore. But no actual mails are being sent.
TIA


Solution found: In Configuration/email options change E-Mail Transport Method to smtp for windows/Mac Os servers.
swtnhpy
Can anyone help with this issue??

I have a different issue with this contrib. Once you enter an email address and push subscribe, it goes to visitoremail.php?action=process with a blank page. The email address is entered into the database just fine. Then you go to send a newsletter, I get this

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/admin/public_html/admin/includes/functions/database.php on line 99

This is my line 99
return mysql_fetch_array($db_query, MYSQL_ASSOC);
Roaddoctor
Found an error (omission) in the Install.txt from 2.1_1

Where it says:

CODE
Step 5.
Open:
/admin/includes/database_tables.php

---------------ADD
// Simple Visitor Newsletter  
  define('TABLE_VISITOR', 'visitor');


CHANGE TO:

CODE
Step 5.
Open:
/admin/includes/database_tables.php

---------------ADD
// Simple Visitor Newsletter  
  define('TABLE_VISITOR', 'visitor');
// Bulk Mailer
  define('TABLE_CUSTOMERS_TEMP', 'customers_temp');
Roaddoctor
Another issue if someone can help me please.

What the heck is this? and how should it be set up properly for English language?

from newsletter_bulk.php

CODE
/////Simple Visitor Newsletter
// copy visitors e-mails to the temporary table
    $copy_query = tep_db_query("select email from " . TABLE_VISITOR );
    while($row = tep_db_fetch_array($copy_query)) {
        if (eregi('^[-a-z0-9._]+@([-a-z0-9_]+\.)+[a-z]{2,6}$',$row['email'])) {
        tep_db_query("insert into " . TABLE_CUSTOMERS_TEMP . " (customers_firstname, customers_lastname, customers_email_address) VALUES ('Assinante', 'Informativo', '" . $row['email'] . "')");
        }
    }
        echo "<b>Banco de dados renovado</b><br>";
      } else {
        echo "<b>Envios serão feitos em banco de dados já iniciado</b><br>";
    }
/////Simple Visitor Newsletter
webcube
QUOTE (Roaddoctor @ Dec 27 2007, 07:43 PM) *
Another issue if someone can help me please.

What the heck is this? and how should it be set up properly for English language?

from newsletter_bulk.php


found same problem...
must be others, so here's what I found....
http://babelfish.altavista.com/tr
strings can be translated from Portuguese to English...

Nothing spooky here..
When mailing a customer first and last name are known (and used)
When mailing mailing list person only e-mail is known and some informative text is entered.
I agree... English would be easier for most of us...
This text should be translated in the language files... To hard for me....
Maybe you ;-)
chingks
Can someone assist me? Everything is fine except when sending bulk newletter I could this msg at Newsletter Manager

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 'BULKMAILER_LIMIT' at line 1

select customers_firstname, customers_lastname, customers_email_address from customers_temp limit BULKMAILER_LIMIT

[TEP STOP]
vladyn
Hi,
I installed the Simple visitor mail 2.1
and then trying to add the latest fix - unsubscribe link in the users mail
BUT
I can't find the files "unsubscribe.php" and "unsubscribe_done.php", described in the install.txt files
the link to the module

Is anybody met this problem or have these files ?
vivipro
Hey,

I hope someone can help me and I thank you in advance for that.

I have the script working and it saves emails to the DB and I have no errors, but, I can not send emails to the subscribers and neither see them in admin or in the dropdown list of the Newsletter manager.

Please help!!

If you do have a user instructions doc, i will be awesome.

Regards,

Gvilla.

QUOTE (central50 @ Jun 6 2007, 02:45 PM) *
I have been looking for a contrib that simply adds an e-mail address that a visitor supplies to receive newsletters. The contribs that I have found are so complicated for the fact that I do not see why, plus the added fact that they have warnings of bad injections, etc.

I am just going to create a contrib that has the visitor add their e-mail via a info box into a separate table. If and when that visitor creates an account, it will check that table if the e-mail exists. If it does, it will delete it out of that visitor table so they do not receive multiple e-mails of one newsletter.

When you go to send a newsletter, it will send e-mails from both the customer table as well as the visitor table. Maybe even write up something to show all the visitor e-mails, and the capability to delete one or more if you wish.

A simple mod to do a simple task.

Is there anything I should know on why a simple contrib has not been written like this? Is there something around that does the same thing I am missing?
-Jon
vivipro
Hey,

I hope someone can help me and I thank you in advance for that.

I have the script working and it saves emails to the DB and I have no errors, but, I can not send emails to the subscribers and neither see them in admin or in the dropdown list of the Newsletter manager.

Please help!!

If you do have a user instructions doc, i will be awesome.

Regards,

Gvilla.
QUOTE (central50 @ Jun 6 2007, 02:45 PM) *
I have been looking for a contrib that simply adds an e-mail address that a visitor supplies to receive newsletters. The contribs that I have found are so complicated for the fact that I do not see why, plus the added fact that they have warnings of bad injections, etc.

I am just going to create a contrib that has the visitor add their e-mail via a info box into a separate table. If and when that visitor creates an account, it will check that table if the e-mail exists. If it does, it will delete it out of that visitor table so they do not receive multiple e-mails of one newsletter.

When you go to send a newsletter, it will send e-mails from both the customer table as well as the visitor table. Maybe even write up something to show all the visitor e-mails, and the capability to delete one or more if you wish.

A simple mod to do a simple task.

Is there anything I should know on why a simple contrib has not been written like this? Is there something around that does the same thing I am missing?
-Jon
eppskevin
QUOTE (dcross02 @ Aug 1 2007, 05:03 PM) *
I've got this installed -- thanks for the needed contribution. However, I can't get it to function with Simple Template System (STS). It shows up, but when I enter an email address, it just gives me an empty template with some of the STS codes showing (i.e. $categorybox, $informationbox). When I turn STS off, it works fine.

I've added this to sts_user_code.php:

$sts->start_capture();
require(DIR_WS_BOXES . 'visitoremail.php');
$sts->stop_capture('visitoremailbox', 'box');

Any ideas?



I don't know if anyone's figured this out or not, but here's how I fixed the problem.

In /catalog/includes/modules/sts_inc/sts_column_left.php

I added these lines:

CODE
//Add Vistor Email box
  require(DIR_WS_BOXES . 'visitoremail.php');
  $sts->restart_capture ('visitoremailbox', 'box');


And added "$visitoremailbox" into the template html file, and it worked just fine.
Meenu
QUOTE (dcross02 @ Aug 1 2007, 10:03 PM) *
I've got this installed -- thanks for the needed contribution. However, I can't get it to function with Simple Template System (STS). It shows up, but when I enter an email address, it just gives me an empty template with some of the STS codes showing (i.e. $categorybox, $informationbox). When I turn STS off, it works fine.

I've added this to sts_user_code.php:

$sts->start_capture();
require(DIR_WS_BOXES . 'visitoremail.php');
$sts->stop_capture('visitoremailbox', 'box');

Any ideas?




hi

i have the same problem how can u solve it. i read all u r msg,but not get any solutions.........plz help me
Meenu
QUOTE (runweb @ Sep 20 2007, 05:23 AM) *
The second thing is:
Visitors can only book the newsletter but not disable it by themselves...

Admin has no management functions to manage (insert/edti/delete) subscribers....

I think there is still some work to do with that contrib ?



Hi

i want to see all newslettermembers in admin side how can i ...........
Meenu
QUOTE (Meenu @ Mar 10 2008, 09:02 AM) *
hi

i have the same problem how can u solve it. i read all u r msg,but not get any solutions.........plz help me



ok i solved this problem...............
letmelearn
QUOTE (Zahoor @ Nov 14 2007, 10:15 PM) *
I am using this contribution, Newsletter Unsubscirbe, together with this contribution and but without bulk-mailer. And i have at the moment managed to come to a point where visitor receive a link in his/her e-mail which can be used to unsubscribe. Problem I am now facing is this that the query I am carry out, listed below:

CODE
tep_db_query("delete from " . TABLE_VISITOR . " where convert ('" . TABLE_VISITOR . "''"."''"email"' using utf8) = '" . $email_to_unsubscribe . "'");


Gives me folloing error:

Parse error: syntax error, unexpected T_STRING in unsubscribe_done.php on line 76


I feel I am really close, but can not figure out whats wrong with that query. If someone could please have a loot at it and correct it for me.

Thanks in advance.


Hi Zahoor, could you post how you solved this problem?

Thanks
LML
bpmcclure
Hi,

I installed the basic version, no bulk mailer, and it works as advertised. But the error messages do not display correctly. Instead, I get a red bar with Error Symbol "ALREADY_EXIST", for example. None of the error messages seem to work.

Any ideas?

Thanks,

Bruce
bpmcclure
QUOTE (bpmcclure @ Mar 19 2008, 02:52 AM) *
Hi,

I installed the basic version, no bulk mailer, and it works as advertised. But the error messages do not display correctly. Instead, I get a red bar with Error Symbol "ALREADY_EXIST", for example. None of the error messages seem to work.

Any ideas?

Thanks,

Bruce


This is the code that appears to be offending. Can someone smarter than me take a look and see what is wrong here?

Thanks,

Bruce
CODE
if (!tep_validate_email($to_email_address)) {
$error = true;

$messageStack->add('visitor', ERROR_TO_ADDRESS);
}
if ($visitor = tep_db_fetch_array($visitor_query)) { //check if this e-mail already exists in visitor database
$error = true;
$messageStack->add('visitor', ALREADY_EXIST);
} elseif ($customer = tep_db_fetch_array($customer_query)) { //okay, does it exist in our customer database?
$error = true;
$messageStack->add('visitor', ALREADY_EXIST);
}

if ($error == false) { // everything is okay
$sql_data_array = array('email' => $to_email_address);

tep_db_perform(TABLE_VISITOR, $sql_data_array);

}
}

?>
budgetland
QUOTE (chingks @ Feb 12 2008, 08:12 PM) *
Can someone assist me? Everything is fine except when sending bulk newletter I could this msg at Newsletter Manager

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 'BULKMAILER_LIMIT' at line 1

select customers_firstname, customers_lastname, customers_email_address from customers_temp limit BULKMAILER_LIMIT

[TEP STOP]


Y had the same problem, you did not complete the sql query. This is the part you didnt insert:

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Bulk Mailer Limit', 'BULKMAILER_LIMIT', '5', 'Defines how many e-mails will be sent at a time', '3', '20', NULL , NOW( ) , NULL , NULL
);

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Bulk Mailer Interval [seconds]', 'BULKMAILER_INTERVAL', '12', 'Defines time between each bulk e-mails send', '3', '20', NULL , NOW( ) , NULL , NULL
);
bpmcclure
Wondering if it is possible to add an attachment to a newsletter sent out using this contribution?

Also wondering if anyone can help with my problem with error messages noted several posts back.


Thanks,

Bruce
bpmcclure
Can anyone help with the problem I noted in Post #29 concerning error messages?

A new issue has cropped up. My html editor preview and the Newsletter Manager preview look a lot different. The one in OSC shows up with a lot of extra lines between text and especially around tables, and punctuation seems to go out differently than it previews. I got this for don't: don’t.

Has anyone figured this out?

Thanks,

Bruce
tsvenkat
QUOTE (Meenu @ Mar 10 2008, 04:10 PM) *
ok i solved this problem...............



I've got this installed -- thanks for the needed contribution. However, I can't get it to function with Simple Template System (STS). It shows up, but when I enter an email address, it just gives me an empty template with some of the STS codes showing (i.e. $categorybox, $informationbox). When I turn STS off, it works fine.

I've added this to sts_user_code.php:

$sts->start_capture();
require(DIR_WS_BOXES . 'visitoremail.php');
$sts->stop_capture('visitoremailbox', 'box');

Any ideas?

hi

how did you solve this problem..?

plz help
Tartan Barty
It says in the fix to add some lines to /login.php but the bit you need to find:

CODE
$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
    } elseif ($password != $confirmation) {
      $error = true;

      $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
    }

    if ($error == false) {


Isn't in login.php

Where do you add the code????
makotoshoto
QUOTE (Tartan Barty @ Jun 4 2008, 10:00 AM) *
It says in the fix to add some lines to /login.php but the bit you need to find:

CODE
$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
    } elseif ($password != $confirmation) {
      $error = true;

      $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
    }

    if ($error == false) {


Isn't in login.php

Where do you add the code????


Those lines are in /create_account.php



tsvenkat, I'm also having the problem with STS (apparently), but nothing shows up on the site. Admin side seems to be ok, but there is no box (tried different places) on the catalogue pages. I'll try and work that out and post here if I manage a fix.
makotoshoto
Couldn't quite fix the STS issue, so I just stuck the box in application_bottom, got annoyed with the format, and removed it. However, now newsletters just aren't being sent.

It gives me this message in red:
Clients that did not receive this newsletter: 2244

Only small packages will be send, as defined by constant BULKMAILER_LIMIT(5 mails) and interval defined by BULKMAILER_INTERVAL (12 seconds).

Wait until the counter reachs 0.



? Nothing happens after I click the send button on that page except the "finished sending emails" which I know it didn't. So I try again, letting the first page just sit there for half an hour. Nothing. I've double-checked my installation, which is fine. Changed the email send settings in Configuration as well.

Did I miss something beyond clicking the "send" button? dry.gif

Edited: wait, you mean I have to keep going back and doing this over and over and over to send out the newsletter in small allotments? Fun. I blame this all on AOL users having their finger on the "spam" button.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.