Jump to content

Import email addresses into Newsletter Block


Recommended Posts

Is it possible to import a list of email addresses into the newsletter block?

I have a list of email addresses that I would like to be included in all future .csv exports - so therefor I am wondering If I can import these addresses and then the newsletter block would manage these as it does all email addresses that sign up through the site normally.

Thanks in advance.

Link to comment
Share on other sites

The only way is to convert the Excel file into an SQL query like the following:

INSERT INTO `ps_newsletter` (`email`, `ip_registration_newsletter`) VALUES
('[email protected]', '0.0.0.0'),
('[email protected]', '0.0.0.0')



PrestaShop requires an IP address for each email address. Hopefully, it will work if you use 0.0.0.0. You could try adding a column to your Excel file for the IP address, enter 0.0.0.0 for the first row, then drag it down to copy it to all the email addresses, then export the file as a CSV file, then open it in a text editor, add the first line above, then search and replace to add the parentheses to make it match the SQL format.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 year later...
  • 3 weeks later...

Hello,

 

To import under prestrashop 1.5.2 syntax

is:

INSERT INTO `prefpres_newsletter` (`id`, `id_shop`, `id_shop_group`, `email`, `newsletter_date_add`, `ip_registration_newsletter`, `HTTP_REFERER`, `active`) VALUES

(1, 1, 1, '[email protected]', '2012-11-27 7:21:34 p.m. ', '0.0.0.0', NULL, 1),

(2, 1, 1, '[email protected]', '2012-12-05 12:00:00 ', '0.0.0.0', NULL, 1);

Edited by lennynero (see edit history)
Link to comment
Share on other sites

  • 7 months later...

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...