Jump to content
mnementh64

[Module] manage newsletter block subscribers

Recommended Posts

hi,

 

I give to the community a small free module to manage and export all people that have subscribed to your newsletters via the front-office block. Now, we can :

- list the subscribers

- delete one (or more by multiple selection)

- export all emails in CSV format

 

Compatible PS 1.2.x, 1.3.x, 1.4.x and 1.5.x (doesn't support the multi-shop mode)

 

But, why not improve it (me or anybody else !).

 

So, if it could be helpful.

 

History :

V0.8 (2012-11-12) : add anti-hacking security control in export.php

V0.7 (2012-08-30) : remove deprecated PHP function (mysql_list_tables) and now is compatible with Prestashop 1.5.x !

V0.6 (2012-02-16) : new feature to check for email doublon when update emails - minor bugs

V0.5 (2011-11-24) : new feature to import emails from a text file

V0.4 (2011-11-02) : can export also emails of customers that have subscribed to newsletters

V0.3 (2011-10-26) : can edit a subscriber's email

V0.2 (2011-10-24) : 1st version

pss_newssubscribers_0.4.zip

pss_newssubscribers_0.5.zip

pss_newssubscribers_0.6.zip

pss_newssubscribers_0.7.zip

pss_newssubscribers_V0.8.zip

Edited by mnementh64 (see edit history)
  • Like 11

Share this post


Link to post
Share on other sites

New version (0.4) to include also emails of customers that have subscribed to newsletters.

Share this post


Link to post
Share on other sites

Here is a 0.5 version with an import emails feature (asked by clah in french forum).

Some more informations :

- we can import text file with one email per line

- check if emails are valid

- check if email already in newsletter or customer tables

- all these issued are displayed to help to debug the import file

 

If you have other ideas, feel free to ask me for them !

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for let us know. I update this module. working great on 1.4.5.1

 

Thanks a lot

Share this post


Link to post
Share on other sites

Hello.

 

First, I'd like to thank you for this module that adds a great functionality.

 

I'd like to make a little sugestion. When the list is empty, no options are offered, but it still should allow you to import a list.

 

Keep up the good work!

 

Thank you!

Share this post


Link to post
Share on other sites

Hi,

 

Here is a new version with some few changes :

- SQL change of deprecated function (thanks to Sillage - see french forum)

- check for email doublons (in newsletter / customer tables) when updating a subscriber's email

- could work (import emails, export customers emails) even if no subscribers are listed

Share this post


Link to post
Share on other sites

Bonjour

Merci pour le travail remarquable, des que je vais gagner un peu d'argent grâce à vous et le module newsletter

je vous ferais un don pour votre travail. Ceci s'adresse aussi aux autres utilisateurs qui font de l'argent avec leurs boutiques.

Un don est utiles pour encourager les développeurs à développer des applications aussi utiles que ça et gratuitement.

Cela représente des heures de travail pour eux ....

Share this post


Link to post
Share on other sites

one of the best module i seen until today.. very easy to instal, no worry with configurations, awesome toturial..keep up with the excelent work

Share this post


Link to post
Share on other sites

Hello mnementh64 ;)

 

Thanks for sharing your module, seems to be a great addon.

For me it is not working cause your module use probably the default PS newsletter subscribe block.

I have a modified newsletter block and styled a bit more then the default PS one, did search into your file to see if it points to the standard module name so that i could point it to the modified module folder but seems i can not find the correct value.

Folder name off my modified module is different but the files inside are the same but a bit modified so it should work.

Now your module says FO module is not installed so the module has no use now.

 

Anyway to fix this so that i point it to my folder ?

 

Default module is blocknewsletter

Modified module is blocknewsletterrevolt

 

Regards,

 

ysco..

Edited by ysco (see edit history)

Share this post


Link to post
Share on other sites

@bionicman : merci beaucoup. C'est sympa pour les dons mais ça ne marche pas alors je préfère faire du gratuit et un peu de payant et puis j'ai la chance de faire ça pour m'amuser, alors c cool !

@pedro21 : what to say else than many thanks !

@ysco : sorry for the delay but I was on vacations. The matter must not be the module folder neither its name, but the DB table associated to. The module is currently looking for a DBPREFIX_newsletter table. Was it renamed by your module ?

Share this post


Link to post
Share on other sites

Hello mnementh64,

 

Will check it tomorrow and let you know the results.

 

Thanks.

 

ysco..

Share this post


Link to post
Share on other sites

Bonjour, je suis intéressé pour télécharger le module, cependant j'aimerais savoir où le placer par ftp?

 

Cordialement.

Share this post


Link to post
Share on other sites

Merci pour la rapidité de ta réponse...mais je sais comment installer un module. Je me suis mal exprimé.

 

Mon soucis est de savoir où placer le fichier

pss_newssubscribers_0.6.zip , si c'est bien celui-ci qu'il faut que je place. En effet j'ai téléchargé le module adminnewsletter mais pour pouvoir gérer la liste d'emails inscrits au blocnewsletter, il faut utiliser ce fichier.

Share this post


Link to post
Share on other sites

Euh, désolé, je ne sais pas - je ne me suis pas du tout occupé du module Adminnewsletter. Peut-être quelqu'un d'autre peut te répondre ou bien demande à celui qui s'occupe du module ?

Share this post


Link to post
Share on other sites

En fait, j'ai créé le module associé à ce post. Un autre contributeur (Eolia je crois) a créé le module adminnewsletter et m'a demandé à intégrer (ou associer, je ne sais plus) mon module au sien. Voilà.

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for this module.

 

 

Unfortunately I get an error ver 0.5

 

Deprecated: Function mysql_list_tables () is deprecated in / home / xxx / domains / xxx / public_html / modules / pss_newssubscribers / pss_newssubscribers.php on line 713

 

Remove and re-install the module does not help

 

Ps ver 1.4.7.3

Share this post


Link to post
Share on other sites

Hi Frens,

 

Sorry for the delay, I was (again !) on vacations. The issue is I use a deprecated function : mysql_list_tables.

I will release soon a new version with the fix.

Share this post


Link to post
Share on other sites

I don't have time now for releasing the module, so here is the change. In the module folder, find the pss_newssubscribers.php file. At the end of the file, replace the function by :

 

/**

* Check if a table exists in a db

*/

public function mysql_table_exists($table , $db)

{

//$tables=mysql_list_tables($db);

mysql_select_db($db);

$tables = mysql_query( 'SHOW TABLES' );

while (list($temp)=mysql_fetch_array($tables))

{

if($temp == $table)

return 1;

}

return 0;

}

HTH

Edited by mnementh64 (see edit history)

Share this post


Link to post
Share on other sites

@Frens : here is a new version without this deprecated version. It's also compatible with Prestashop 1.5 (tested on RC2) but doesn't support the multi-shop.

Share this post


Link to post
Share on other sites

Bonjour,

 

J 'ai une galère, le block inscription a la newsletter situé sur ma page d’accueil ne fonctionne pas et je ne sais pas quoi faire. ce module est super important.

 

Quelqu un me donner une methode sur l'investigation svp?

 

Mon site www-100-dessous.com

 

cdlt

Share this post


Link to post
Share on other sites

Hi Rimake,

This is an english forum and this post is about a module, not at all about the front-office newsletter block. So I suggest you to create a new post in some french forum.

 

Regards,

Share this post


Link to post
Share on other sites

Hello, the module is very well done!

how can I create a tab that reports directly to the configuration of the module?

Thank you.

Share this post


Link to post
Share on other sites

To do this, you have to change most of the module structure. It could be hard if you haven't written such a tab module before !

Share this post


Link to post
Share on other sites

To do this, you have to change most of the module structure. It could be hard if you haven't written such a tab module before !

 

There are a guide?

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this module, I'll give it a try.

One thing that went to my mind, that I didn't see in the features list, is that we could make some filtering before exporting. For example, sometimes it can be useful to get the subscribers from one or more countries (but not all), or the list of people that have bough from a specific category and it's sub categories...

Share this post


Link to post
Share on other sites

Thanks for this Great Module ! Does anyone know how can I edit the email that is sent by this module for new subscribers?

Share this post


Link to post
Share on other sites

Hello! Had anybody the problem of trying too hook the module in the right column ant there is an error: This module cannt be transplanted to this hook. Thank you!

Share this post


Link to post
Share on other sites

hi,

 

I give to the community a small free module to manage and export all people that have subscribed to your newsletters via the front-office block. Now, we can :

- list the subscribers

- delete one (or more by multiple selection)

- export all emails in CSV format

 

Compatible PS 1.2.x, 1.3.x, 1.4.x and 1.5.x (doesn't support the multi-shop mode)

 

But, why not improve it (me or anybody else !).

 

So, if it could be helpful.

 

History :

V0.8 (2012-11-12) : add anti-hacking security control in export.php

V0.7 (2012-08-30) : remove deprecated PHP function (mysql_list_tables) and now is compatible with Prestashop 1.5.x !

V0.6 (2012-02-16) : new feature to check for email doublon when update emails - minor bugs

V0.5 (2011-11-24) : new feature to import emails from a text file

V0.4 (2011-11-02) : can export also emails of customers that have subscribed to newsletters

V0.3 (2011-10-26) : can edit a subscriber's email

V0.2 (2011-10-24) : 1st version

hi, I downloaded the version pss_newssubscribers_V0.8.zip but when I try to export to csv file I get this error: "Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator at postmaster@toccodipassione.com to inform them of the time this error occurred, and the actions you performed just before this error.

 

More information about this error may be available in the server error log. "

 

can you help me?

I use PS 1.5.5.0

Share this post


Link to post
Share on other sites
Hi I installed this module on prestashop today. I was testing it out, and for some reason when you sign up for the newsletter it will tell you that the email is already signed up when its not, but the thing is it displays that error but continues on with the inserting it into the database and sending a confirmation email? Does anybody have this module and know how to get this to stop? Here is the bit of code that checks if the email has been used or not. The module is pss_newssubscibers.

 



    private function newsletterRegistration()
    {
        if (empty($_POST['email']) || !Validate::isEmail($_POST['email']))
            return $this->error = $this->l('Invalid email address');


        /* Unsubscription */
        else if ($_POST['action'] == '1')
        {
            $register_status = $this->isNewsletterRegistered($_POST['email']);
            if ($register_status < 1)
                return $this->error = $this->l('This email address is not registered.');
            else if ($register_status == self::GUEST_REGISTERED)
            {
                if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->id))
                    return $this->error = $this->l('An error occurred while attempting to unsubscribe.');
                return $this->valid = $this->l('Unsubscription successful');
            }
            else if ($register_status == self::CUSTOMER_REGISTERED)
            {
                if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->id))
                    return $this->error = $this->l('An error occurred while attempting to unsubscribe.');
                return $this->valid = $this->l('Unsubscription successful');
            }
        }
        /* Subscription */
        else if ($_POST['action'] == '0')
        {
            $register_status = $this->isNewsletterRegistered($_POST['email']);
            if ($register_status > 0)
                return $this->error = $this->l('This email address is already registered.');


            $email = pSQL($_POST['email']);
            if (!$this->isRegistered($register_status))
            {
                if (Configuration::get('NW_VERIFICATION_EMAIL'))
                {
                    // create an unactive entry in the newsletter database
                    if ($register_status == self::GUEST_NOT_REGISTERED)
                        $this->registerGuest($email, false);


                    if (!$token = $this->getToken($email, $register_status))
                        return $this->error = $this->l('An error occurred during the subscription process.');


                    $this->sendVerificationEmail($email, $token);


                    return $this->valid = $this->l('A verification email has been sent. Please check your inbox.');
                }
                else
                {
                    if ($this->register($email, $register_status))
                        $this->valid = $this->l('You have successfully subscribed to this newsletter.');
                    else
                        return $this->error = $this->l('An error occurred during the subscription process.');


                    if ($code = Configuration::get('NW_VOUCHER_CODE'))
                        $this->sendVoucher($email, $code);


                    if (Configuration::get('NW_CONFIRMATION_EMAIL'))
                        $this->sendConfirmationEmail($email);
                }
            }
        }
    }

Share this post


Link to post
Share on other sites

No funciona en PS 1.6. He intentado instalarlo pero no me deja. Da error.

 

Don't work in PS 1.6. I've tried install it but PS give me a error.

Share this post


Link to post
Share on other sites

Yes, it's a pity that this module is not compatible with PS 1.6. :(

 

I often have to check our newsletter subscribers and delete dubious entries. Though it can easily be done directly in the database with phpMyAdmin. This is really something that should be possible from the BO!

 

Any other (free) solution available?

Share this post


Link to post
Share on other sites
Hi guys,  

I am writing to you because there is no answer to the problem of the newsletter showing in both the header and footer. I am not able to remove the newsletter from the front page. I would like to keep one 'newsletter' option.  At the moment there are 2 newsletter blocks on the front page, see www.rosieposy.fr

 

Please could you tell me how to 1. remove the newsletter box in the header and how to configure the newsletter block in the footer as it overwrites the original footer colours . 

Thank you for any advice

Kind regards

Len 

  :-D

  • Like 1

Share this post


Link to post
Share on other sites

Is it possible to make it so it will
email the subscribers to an admins email? better if it wouldnt mail the csv . but the subscribers mail as soon as he inserts into the newsletter block module.?

Share this post


Link to post
Share on other sites

This should work on 1.6. 

 

The module had a check that didn't allow installation with 1.6. I removed that check. For the rest I didn't make changes.

 

I didn't have time for extensive tests.

 
 
Thank you. It works well.
It would be possible in the csv file exported from the store to minismailchimp the following data? (not just email).
 
Email, First Name, Last Name
email1 @ servidor.com, Name1, Surname1 Surname2
email2 @ servidor.com, Name2, Surname1 Surname2
email3 @ servidor.com, Name3, Surname1 Surname2
 
Best regards.
Gwend
 

Share this post


Link to post
Share on other sites

the 0.8.1 works on 1.6.1.12 version but to delete a single subscriber you cannot use the trash icon present under action column. it gave error.

Edited by ANGELO Vintage (see edit history)

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

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More