Ferdem Posted May 22, 2010 Share Posted May 22, 2010 Hello everyone,i have to del customer messages on BOHow can i delete customer messages? Link to comment Share on other sites More sharing options...
rocky Posted May 22, 2010 Share Posted May 22, 2010 It is not possible to delete customer messages in the Back Office at the moment. The only way is to manually delete them from the ps_message and ps_message_readed tables using phpMyAdmin. Link to comment Share on other sites More sharing options...
Mikie Posted October 15, 2010 Share Posted October 15, 2010 Same problem for me.I made some edit in the code:adminXYZ/tabs/AdminOrders.php added a new elseif after the markAsReaded line 286 elseif (isset($_GET['messageReaded'])) { Message::markAsReaded(intval($_GET['messageReaded']), intval($cookie->id_employee)); } //new code for deleting messages elseif (isset($_GET['deleteMessage'])) { Message::deleteMessage(intval($_GET['deleteMessage']), intval($cookie->id_employee)); } //end new code for deleting messages parent::postProcess(); adminXYZ/tabs/AdminOrders.php added this code around line 800: echo (intval($message['private']) == 1 ? ''.$this->l('Private:').'' : ''); //the next line add a nice X icon for deleting message echo ' l('Delete message').'" href="'.$_SERVER['REQUEST_URI'].'&deleteMessage;='.intval($message['id_message']).'">'; echo ' '.nl2br2($message['message']).''; The most important: in classes/Message.php added a new function static public function deleteMessage($id_message) { if (!Validate::isUnsignedId($id_message)) die(Tools::displayError()); $result = Db::getInstance()->Execute(' DELETE FROM '._DB_PREFIX_.'message WHERE id_message ='.intval($id_message).'; '); $result2 = Db::getInstance()->Execute(' SELECT * FROM '._DB_PREFIX_.'message_readed WHERE id_message ='.intval($id_message).'; '); if ($result2!=''){//there are some read messages, let's delete those records too $result3 = Db::getInstance()->Execute(' DELETE FROM '._DB_PREFIX_.'message_readed WHERE id_message ='.intval($id_message).'; '); } return $result; } I hope this can help Link to comment Share on other sites More sharing options...
kilwag Posted April 6, 2011 Share Posted April 6, 2011 I would like to see the ability to delete messages added to the Prestashop core. Seems reasonable and useful. Link to comment Share on other sites More sharing options...
kostasvel Posted November 3, 2011 Share Posted November 3, 2011 Based on this post http://www.prestashop.com/forums/topic/7828-solved-deleting-test-orders/page__view__findpost__p__343799 Open /prestashop site root/admin/tabs/AdminMessages.php via your fav editor. Find this code about 36th line $this->colorOnBackground = true; After this add this line [size=3]$this->delete = true;[/size] Link to comment Share on other sites More sharing options...
bjp Posted October 11, 2012 Share Posted October 11, 2012 Based on this post http://www.prestasho...post__p__343799 Open /prestashop site root/admin/tabs/AdminMessages.php via your fav editor. Find this code about 36th line $this->colorOnBackground = true; After this add this line [size=3]$this->delete = true;[/size] This doesn't work. Link to comment Share on other sites More sharing options...
meetkaur142 Posted October 12, 2012 Share Posted October 12, 2012 Its simple.... Link to comment Share on other sites More sharing options...
nikketrikke Posted January 1, 2013 Share Posted January 1, 2013 Its simple.... simple what ????? instead of write nonsense sentence motive how you do this and help forums Link to comment Share on other sites More sharing options...
Stefand Posted March 26, 2013 Share Posted March 26, 2013 (edited) root/admin/tabs/AdminMessages.php You place this on line 36: $this->delete = true; For the DELETE icon and function in the tab: AdminMessages (where you can find all the messages). Works in Prestashop 1.4 Edited March 26, 2013 by Stefand (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts