Lpeek Posted March 21, 2010 Share Posted March 21, 2010 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. Link to comment Share on other sites More sharing options...
rocky Posted March 21, 2010 Share Posted March 21, 2010 The _getBlockNewsletter function in modules/newsletter/newsletter.php gets the newsletter data and the _postProcess function writes the CSV file. Link to comment Share on other sites More sharing options...
FunnyBunnyHelena Posted August 3, 2010 Share Posted August 3, 2010 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. Link to comment Share on other sites More sharing options...
Patric Posted August 3, 2010 Share Posted August 3, 2010 If you want to export the e-mails of the regitered persons, you can use the dedicated module :Back Office >> ModulesNewsletter (section Tools)Configure >> Link to comment Share on other sites More sharing options...
FunnyBunnyHelena Posted August 3, 2010 Share Posted August 3, 2010 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 ) Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 3, 2010 Share Posted August 3, 2010 Geez man, it's a CSV file, open it in Excel and remove the fields you don't want, then save it again. Link to comment Share on other sites More sharing options...
FunnyBunnyHelena Posted August 3, 2010 Share Posted August 3, 2010 I don't have Excel installed.. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 3, 2010 Share Posted August 3, 2010 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: 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; } 1 Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 3, 2010 Share Posted August 3, 2010 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. Link to comment Share on other sites More sharing options...
FunnyBunnyHelena Posted August 3, 2010 Share Posted August 3, 2010 Thank you for your help. Link to comment Share on other sites More sharing options...
Patric Posted August 3, 2010 Share Posted August 3, 2010 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. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 3, 2010 Share Posted August 3, 2010 Well, I thought we did but, whatever...Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts