Does anyone know where the code is for the export of csv files in the newsletter module? I cant find anything anywhere, and theres is no reference to it in the blockNewsletter module???
I need to change what fields are exported in the csv file as the defult prestashop settings dont work with any email marketing software like mail chimp or constant contact.
I need to change what fields are exported in the csv file as the defult prestashop settings dont work with any email marketing software like mail chimp or constant contact.
Trashy Art - Handmade Kitsch Jewellery from the UK.
The _getBlockNewsletter function in modules/newsletter/newsletter.php gets the newsletter data and the _postProcess function writes the CSV file.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
I am sorry for bringing up this old topic, but I want to modify too..
But I have NO clues about PHP, sorry.
I want to have the output list of ONLY email addresses and nothing else.
I use Eudora and I have yet to figure out how to import things there. I only get one box that asks for PST files.
But I have NO clues about PHP, sorry.
I want to have the output list of ONLY email addresses and nothing else.
I use Eudora and I have yet to figure out how to import things there. I only get one box that asks for PST files.
If you want to export the e-mails of the regitered persons, you can use the dedicated module :
Back Office >> Modules
Newsletter (section Tools)
Configure >>
Back Office >> Modules
Newsletter (section Tools)
Configure >>
Patric Codron • Community Manager | Manager de Communauté • PrestaShop
Merci de respecter les règles du forum PrestaShop.com :)
Please comply with the PrestaShop.com forum rules :)
Merci de respecter les règles du forum PrestaShop.com :)
Please comply with the PrestaShop.com forum rules :)
But that's what I am doing, and the result file contains fields I do not wish to be there, I just want a file with email addresses only, no other data. (such as name, date, ip )
Geez man, it's a CSV file, open it in Excel and remove the fields you don't want, then save it again.
OK, then to make it only export the emails, you must modify the newsletter.php file. Can you handle that?
Change this code, around line 112:
to this:
Change this code, around line 112:
private function _getBlockNewsletter()
{
$rq = Db::getInstance()->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'newsletter`');
$header = array('id_customer', 'email', 'newsletter_date_add', 'ip_address');
$result = (is_array($rq) ? array_merge(array($header), $rq) : $header);
return $result;
}
to this:
private function _getBlockNewsletter()
{
$rq = Db::getInstance()->ExecuteS('
SELECT email
FROM `'._DB_PREFIX_.'newsletter`');
$header = array('email');
$result = (is_array($rq) ? array_merge(array($header), $rq) : $header);
return $result;
}
I find that code very strange because I don't see a table called ps_newsletter in ANY of my installations. v1.25, v1.3.0.1 or v1.3.1.
From 1280843968:
I find that code very strange because I don't see a table called ps_newsletter in ANY of my installations. v1.25, v1.3.0.1 or v1.3.1.
This is because you do not have the Newsletter block module installed.
I would recommand using OpenOffice Calc (free) instead of Excel to manage CSV files.
Patric Codron • Community Manager | Manager de Communauté • PrestaShop
Merci de respecter les règles du forum PrestaShop.com :)
Please comply with the PrestaShop.com forum rules :)
Merci de respecter les règles du forum PrestaShop.com :)
Please comply with the PrestaShop.com forum rules :)



Back to top









