sembrouille Posted November 18, 2012 Share Posted November 18, 2012 This contribution allows visitors to subscribe to the newsletter (without being customers), it can manage (modify, delete, send) newsletters and manage subscribers. http://addons.oscommerce.com/info/8472 Quote Link to comment Share on other sites More sharing options...
sembrouille Posted January 7, 2013 Author Share Posted January 7, 2013 Updated: 1) Fixed bug unsubscribe 2) insert unsubscribe link at the bottom of page 3) adding link to view NL in website Quote Link to comment Share on other sites More sharing options...
dculley Posted February 2, 2013 Share Posted February 2, 2013 I really like the contribution. But I have found one error and would like to know how to fix it. It is not picking up any new customers that sign up though creating account, or if I change their account to subscribe. After I install the add on it picked up exciting accounts. But not any new ones. I think it is my SQL setup. It be here – what I have Bold and underlined, is not in the files. Not sure how to add them. Also have included pic’s on the two files. MODIFICATION SQL ------------------------------------ CREATE TABLE IF NOT EXISTS `newsletter_abonnement` ( `abonnement_id` int(11) NOT NULL auto_increment, `abonnement_addresse_email` varchar(80) NOT NULL default '', `abonnement_date_creation` datetime default '0000-00-00 00:00:00', `abonnement_newsletter` int(4) default NULL, PRIMARY KEY (`abonnement_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO newsletter_abonnement (abonnement_addresse_email, abonnement_date_creation, abonnement_newsletter) SELECT customers_email_address, now(), customers_newsletter FROM customers WHERE customers_newsletter = '1'; Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 3, 2013 Author Share Posted February 3, 2013 it is not bugs but forget, and there are two forgets : 1) "It is not picking up any new customers that sign up though creating account." fix it in ===> add a small sql script in "catalog/create_account.php" 2) "or if I change their account to subscribe." fix it in ===> add a small sql script in "admin/customers.php" ============================== I noted, I fix it soon. thank you for your bug report Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 5, 2013 Author Share Posted February 5, 2013 Osc2.3 ===================== In catalog/create_account.php find : if ($error == false) { replace : if ($error == false) { // addon subscribe newsletter by brouillard s'embrouille $sql_subscribe_newsletter = array('abonnement_addresse_email' => $email_address, 'abonnement_date_creation' => 'now()', 'abonnement_newsletter' => $newsletter); tep_db_perform(TABLE_CUSTOMERS, $sql_subscribe_newsletter); Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 5, 2013 Author Share Posted February 5, 2013 Erratum : ======================== In catalog/create_account.php find : if ($error == false) { replace : if ($error == false) { // addon subscribe newsletter by brouillard s'embrouille $sql_subscribe_newsletter = array('abonnement_addresse_email' => $email_address, 'abonnement_date_creation' => 'now()', 'abonnement_newsletter' => $newsletter); tep_db_perform(TABLE_NEWSLETTER_ABONNEMENT, $sql_subscribe_newsletter); Quote Link to comment Share on other sites More sharing options...
dculley Posted February 6, 2013 Share Posted February 6, 2013 Are you sure you want to "replace" or add. The current file is as follows: if ($error == false) { $sql_data_array = array('customers_firstname' => $firstname, 'customers_lastname' => $lastname, 'customers_email_address' => $email_address, 'customers_telephone' => $telephone, 'customers_fax' => $fax, 'customers_newsletter' => $newsletter, 'customers_password' => tep_encrypt_password($password)); if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender; if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob); tep_db_perform(TABLE_CUSTOMERS, $sql_data_array); Quote Link to comment Share on other sites More sharing options...
dculley Posted February 10, 2013 Share Posted February 10, 2013 Not working. I'm running SCO2.3.3. So I used your suggestion for that version. When new customers are added they still are not being added to the list. The program works on the subscribe to email only. Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 10, 2013 Author Share Posted February 10, 2013 it works. 1) Perhaps you did not check the box during create account 2) or you did not make the right change : ==================================================================== In catalog/create_account.php find : if ($error == false) { replace : if ($error == false) { // addon subscribe newsletter by brouillard s'embrouille $sql_subscribe_newsletter = array('abonnement_addresse_email' => $email_address, 'abonnement_date_creation' => 'now()', 'abonnement_newsletter' => $newsletter); tep_db_perform(TABLE_NEWSLETTER_ABONNEMENT, $sql_subscribe_newsletter); Quote Link to comment Share on other sites More sharing options...
dculley Posted February 10, 2013 Share Posted February 10, 2013 I have 169 lines of code under if ($error==false){. What part do I replace? Are you asking to replace all of it or just what I have listed above? Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 10, 2013 Author Share Posted February 10, 2013 In catalog/create_account.php find this code : if ($error == false) { Quote Link to comment Share on other sites More sharing options...
dculley Posted February 10, 2013 Share Posted February 10, 2013 OK - I just replace the top part that add your lines in it. I have the following results: When adding a customer from the main site the following happens: - Added customer with no to subscribe. Added email to admin/nl sub with a red bullet. ( I don't think it should have added it at all. Your program is to only pick up if =1) - Went back and modified the customer to "subscribe" Did not change the red bullet to green. It added another line SQL DB one with=0 and one with =1 [line 11 &12] - When I went in to admin and deleted the customer, it did not remove the email from the list ------------------------------------------------------------ Next test: My template from Algozone has on the front page a box for the customer to op for the newsletter. When a customer does this it adds it to the db in SQL_newsletter_subscriber and there for the newsletter_abonnement does not pick it up. -------------------------------------------------------------------- Next test: From the admin side: Create customer: 1st I created with out subscribing. Subscribe Mgr did not pick it up - OK 2nd I went back and edit the customer to scribe. Subscribe Mgr did not pick it up - Not OK Check the SQL files and nothing in either nl_ab or nl_sub. Check the SQL file in customers and it is showing a 1 in subscribe. --------------------------------------------------------------------------------------------------- Thanks and hope this helps nail out the little bugs. Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 19, 2013 Author Share Posted February 19, 2013 Ok, this is fixed. (If you do not want to replace) In catalog/create_account.php find : if ($error == false) { add below : // addon subscribe newsletter by brouillard s'embrouille if ($newsletter == 1) { $sql_subscribe_newsletter = array('abonnement_addresse_email' => $email_address, 'abonnement_date_creation' => 'now()', 'abonnement_newsletter' => $newsletter); tep_db_perform(TABLE_NEWSLETTER_ABONNEMENT, $sql_subscribe_newsletter); } Quote Link to comment Share on other sites More sharing options...
dculley Posted February 20, 2013 Share Posted February 20, 2013 That worked. Thank you Quote Link to comment Share on other sites More sharing options...
dculley Posted February 20, 2013 Share Posted February 20, 2013 Down loaded your new file. I don't know how important step 12 is but the file to "find" is not in the footer.php of 2.3.3. So not sure what to do with this step. Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 20, 2013 Author Share Posted February 20, 2013 (edited) This step is optionally, you can insert newsletter_boxe in footer, you can find the file in /catalog/includes/modules/newsletter_footer.php "Optionally, you can insert newsletter boxe in footer (12) /catalog/includes/footer.php * FIND: * REPLACE: ..... " Edited February 20, 2013 by sembrouille Quote Link to comment Share on other sites More sharing options...
sembrouille Posted February 20, 2013 Author Share Posted February 20, 2013 another update for the shared hosting is being Quote Link to comment Share on other sites More sharing options...
newburns Posted March 2, 2013 Share Posted March 2, 2013 Everything works GREAT, However.... When creating a Newsletter from newsletter manager in the admin section it says TEXT_NEWSLETTER_FOOTER *Required I can define it in the language file if I knew what was supposed to be there. It's required whatever it is. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2013 Share Posted March 4, 2013 Hi Sembrouille! Thanks very much for your addon, a great contribution indeed! I am however having some issues with the functinonality. When a use attempts to remove themselves from the Newsletter, It returns the error "Email adress () not found in our database, or it has already been removed from our list." on the page "newsletter_desabonnement_success.php". If you could please provide assistance on the above that would be wonderful. Additionally, is there meant to be a function to edit a newsletter? Thanks again. Quote Link to comment Share on other sites More sharing options...
sembrouille Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) Everything works GREAT, However.... When creating a Newsletter from newsletter manager in the admin section it says TEXT_NEWSLETTER_FOOTER *Required I can define it in the language file if I knew what was supposed to be there. It's required whatever it is. in this "input case" put this : </body> </html> Edited March 5, 2013 by sembrouille Quote Link to comment Share on other sites More sharing options...
sembrouille Posted March 5, 2013 Author Share Posted March 5, 2013 in this "input case" put this : </body> </html> Quote Link to comment Share on other sites More sharing options...
sembrouille Posted March 5, 2013 Author Share Posted March 5, 2013 @@newburns addon updated without TEXT_NEWSLETTER_FOOTER Quote Link to comment Share on other sites More sharing options...
sembrouille Posted March 5, 2013 Author Share Posted March 5, 2013 Hi Nathan I do not understand your problem, I make an update considering Addon security_pro Quote Link to comment Share on other sites More sharing options...
dculley Posted March 7, 2013 Share Posted March 7, 2013 Hi, I applied your update. And ran a test newsletter. On the admin side I did not see the error (bug). But when I received the test I had following across the top: TEXT_NEWSLETTER_VIEW --------------------------------------------- TEXT_NEWSLETTER_VIEW just a little devil To unsubscribe from Ladybug Garden Decor newsletter unsubscribe. -------------------------------------------- How to fix this? Quote Link to comment Share on other sites More sharing options...
sembrouille Posted March 7, 2013 Author Share Posted March 7, 2013 it is possible that I forgot :)-----------------------------------in admin/includes/languages/english/modules/newsletters/add this :define('TEXT_NEWSLETTER_VIEW', ' If you do not see this newsletter correctly, %s visit our online version. '); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.