Jump to content
sembrouille

Newsletters Subscribers Manager - Oscommerce 2.3 & 2.2

Recommended Posts

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';post-303521-0-49879900-1359832501_thumb.jpg

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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]

 

post-303521-0-80149300-1360513877_thumb.jpg

 

- When I went in to admin and deleted the customer, it did not remove the email from the list

 

post-303521-0-68174800-1360514003_thumb.jpg

 

------------------------------------------------------------

 

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.

Share this post


Link to post
Share on other sites

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);

}

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by sembrouille

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by sembrouille

Share this post


Link to post
Share on other sites

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

 

devil_smile.gifjust a little devil

 

 

To unsubscribe from Ladybug Garden Decor newsletter unsubscribe.

--------------------------------------------

How to fix this?

Share this post


Link to post
Share on other sites

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.

 

');

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×