Pressed0024 Posted November 14, 2012 Share Posted November 14, 2012 Don't you think Prestashop 1.5 having saved order comments appearing in the Customer Service page a really smart move. I mean if order comments are saved at the order page in BO, it SHOULD stay at the order page. Not having us to click on "see all messages" and go through the pile of rows to find the comment thread. It's a pain I can no longer see all the order comments in a single page. How are you guys overcoming this hassle? 2 Link to comment Share on other sites More sharing options...
Swickaar Posted November 14, 2012 Share Posted November 14, 2012 You have a valid point buddy. We used to use the order messages for each order note and the private message as order note for other employees. Things are more complicated now. I am waiting for version 3 AKA 1.5.3 Link to comment Share on other sites More sharing options...
Swickaar Posted November 23, 2012 Share Posted November 23, 2012 Isn't anyone else facing this issue? 1 Link to comment Share on other sites More sharing options...
nathanielleee Posted December 6, 2012 Share Posted December 6, 2012 Here here. Its a head ache and a pain for me and the other employees who deal with customers. 1 Link to comment Share on other sites More sharing options...
THM11 Posted December 11, 2012 Share Posted December 11, 2012 Yep, Prestashop really fucked this one up and really big way! It's really horrible pain in the ass to not to see the freaking important "private notes" in the ORDER page. I and my employees don't give a fuck about the "consolidation of the messages" - c'moon really! How in earth did you prestashop guys think this was a smart move??? We've already screwed up couple orders, because the messages are not there and there's really no easy way to find them... If we have 10+ orders per day (which is kind of small still), and we need to add notes to every third of these, this becomes horrible! So please prestashop, admit you guys were wrong and you'll put the messages back to the orders pages where they should be. I don't object of having them still in the "message hub" but current situation is really fucked up! 1 Link to comment Share on other sites More sharing options...
henribaeyens Posted December 21, 2012 Share Posted December 21, 2012 There is a way to show the thread relative to an order on the adminorders page. It involves overriding the adminorders controller, the customerthread class (just to add one method), the orders view template an copy the message template in the override orders template. Seems complicated but really it isn't; takes a few minutes. Link to comment Share on other sites More sharing options...
tinyhands Posted January 12, 2013 Share Posted January 12, 2013 There is a way to show the thread relative to an order on the adminorders page. It involves overriding the adminorders controller, the customerthread class (just to add one method), the orders view template an copy the message template in the override orders template. Seems complicated but really it isn't; takes a few minutes. Looks like henribaeyens has a kind-of-workaround. I'm not too familiar with code. Can anyone help spell it out? Or is there a better solution? Link to comment Share on other sites More sharing options...
Little Fairy Posted January 14, 2013 Share Posted January 14, 2013 Henribaeyens, can you please (please, please, please ) give us some more detailed instructions? Link to comment Share on other sites More sharing options...
qicpf Posted January 23, 2013 Share Posted January 23, 2013 I would be interested in this as well. Link to comment Share on other sites More sharing options...
BillyHardcore Posted January 23, 2013 Share Posted January 23, 2013 If this module would also include order comments on the invoice, I might be interested Link to comment Share on other sites More sharing options...
scottm Posted January 23, 2013 Share Posted January 23, 2013 There seem to be a few people upset about this change. Is there a suggestion thread or someplace we can express this to the PrestaShop team? 1 Link to comment Share on other sites More sharing options...
qicpf Posted January 23, 2013 Share Posted January 23, 2013 (edited) If this module would also include order comments on the invoice, I might be interested There is a sort of workarround for this here http://www.prestasho...80#entry1078180 I think this might also suffer from the same reason this Order coments dont show on the Order. and the fact they you two seperate tables to store Order comments. a messages table and a customer_message table. i cant for the life of me see why this is a step forward or even a step anywhere. Just seems very confusing.... From what i can tell when a order is placed and a message is entered then it gets added to messages. if a message is added later by the customer service it is added to the customer_message table. Why not just use one table and then the current code thats in the order display will still work? anyway /rant off Edited January 23, 2013 by qicpf (see edit history) Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 (edited) Hello guys, I've had the same problem a few days ago and i read this topic but didn't found any usefull information apart from what henribaeyens wrote "It involves overriding the adminorders controller, the customerthread class (just to add one method), the orders view template an copy the message template in the override orders template." so i found a way to display the messages in the Order Detail page in Back Office. I implemented this change for Prestashop 1.5.2.0. It should work for the other versions. I will be releasing a module the following days with override that will make it much easier to apply these changes. Edited January 24, 2013 by anekeen (see edit history) 1 Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 (edited) What version are you running so i get the right line numbers? Please ignore me i ree-read what you wrote and i have to replace code so i can see what i have to do.... got a bit excited Edited January 24, 2013 by qicpf (see edit history) Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 You only have to replace in 2 files and add the method "getCustomerMessagesUnread". I didn't bothered with a proper name of the method because i was more focused on making it work. Please let me know if it works, i'm excited in finding this fix and i wanna help coz i know how frutration the Prestashop team can be with lack of support in such issues. Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 Straight copy paste failed i just get a blank page. ill just see if i can find the error Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 Check the method you wrote in the CustomerThread, usually the blank page in Back Office is related to php error code and i got that when testing the sql command to the database. I ll be around for a few more minutes if you need any help. Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 I copied yours and pasted to the end of the Classes/CustomerThread.php file Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 Did it worked ? If you want you can give me your teamviewer and take a look, this way i will see where the code i pasted was wrong. Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 its a linux machine no teamviewer how can i see what is causing the error ? Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 You can't see in Back Office, even if you have display_errors "on" on config.php. Take it easy, step by step, as i did when i implemented the fix. Revert back to the files before you applied these fixes and do the following steps. Step 1. Add method in CustomerThread class, add it after the method "getCustomerMessages" at the line 75. Upload the file then see if Back Office is ok. Step 2. If all is ok, then add the change in AdminOrdersControllers. Check if Back Office is being displayed. Then finally Step 3. Add the code in the view.tpl in the back office theme, in orders folder. Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 OK it works. I found what i did wrong. Dont just add it to the bottom of the Classes/CustomerThread.php you must add it before the final } or it is outside of the class I havent read the code yet but i am assuming it only adds the messages from the Customer messages now and not the original messages table is this correct? I have to go home from work now so it may be an hour before you get a reply to this. Thanks you are a legend. Maybe we can ask the Prestashop guys to include this in the next release. 1 Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 24, 2013 Share Posted January 24, 2013 (edited) It reads from the table where all the Order messages are stored. From what i've noticed it's grouped in Threads and each thread has assigned an order and customer so i guess it displays just the comments either the client or the administrator of the shop comments on that order. Btw i'm trying to fix now the issue when the default combination of a produc runs out of stock and it doesn't shift to the next available combination. Do you have that issue/error ? Do you know any leads on that ? I have to go home from work now so it may be an hour before you get a reply to this. Thanks you are a legend. I'm glad i could help Edited January 24, 2013 by anekeen (see edit history) Link to comment Share on other sites More sharing options...
qicpf Posted January 24, 2013 Share Posted January 24, 2013 (edited) I havent seen that problem yet. Its got so many bugs we ignore most of them and work arround the rest. if i had the time i would log them. Their way of doing stock astounds me sometimes. and the accounting side of it is somtimes just wierd. I have only been using it a few months so it may just be me. But i cant complain too loudly its free and does what we need. We only run a small uniform store for the Local school. Thanks again for the code. If i get time ill see if i can get it to add the messages in the message table to the code you have done now i have a place to start. Not understanding how the override stuff work i was hoping to find a way of putting code into somewhere that wont get overwritten on every update. But for another day kids screaming for food must go. Phil Edit Spelling Edited January 24, 2013 by qicpf (see edit history) Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 (edited) OK, After much poking and proding i have a combined Message table and customer messages using the code above from anekeen. Thank you for that!! I have removed the code at a request. This will be made into a module. If you have an Urgent need for it then PM me and we will discuss it. Edited January 25, 2013 by qicpf (see edit history) Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 I would love to see a module based on this but im yet to learn how to do that. I dislike modding the CORE. Thanks again anekeen. Link to comment Share on other sites More sharing options...
THM111 Posted January 25, 2013 Share Posted January 25, 2013 Hi, Awesome! This is great starting point, but as you stated there are some issues, here's couple of them: *You cannot anymore remove the green tick from the message from the customer (=> Fatal Error) - minor issue, but still *As you stated it doubles the messages that are in both tables *It collects ALL the message with that customer, not just the ones related to that order BUT it's still huge improvement compared to the removed functionality that Prestashop team has done. Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 (edited) Ok i was wondering about the all message by customer bit. give me two for a fix on that ill look at the tick click as well now. Edited January 25, 2013 by qicpf (see edit history) Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 See above for update THM111 Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 Ok last edit for the above unless someone figures out how to read the messages. thanks for listening Link to comment Share on other sites More sharing options...
qicpf Posted January 25, 2013 Share Posted January 25, 2013 Overriding the class was easy just move it into the override class. But the controllers/admin/AdminOrdersController.php i cant figure out how to do that one. and the template i dont know how either. Link to comment Share on other sites More sharing options...
monszaic concepts Posted January 25, 2013 Share Posted January 25, 2013 Hello qicpf, I've removed the code i posted because i am working in transforming it into a module. I have another module on Addons and i know the steps and what it requires to make it available on Addons. Thanks for helping with the messages addition If you want you can team up with me and we ll make the module within a few days. Link to comment Share on other sites More sharing options...
siomosp Posted February 6, 2013 Share Posted February 6, 2013 Hello, are there any updates for module development? Link to comment Share on other sites More sharing options...
monszaic concepts Posted February 6, 2013 Share Posted February 6, 2013 Hello siomsop, Tonight i'm uploading the module to Prestashop Addons, but it will be 7 days until they approve it. I can implement the changes directly in your files if you want it within the next tens of minutes. Link to comment Share on other sites More sharing options...
legacy12 Posted February 6, 2013 Share Posted February 6, 2013 Great! Link to comment Share on other sites More sharing options...
monszaic concepts Posted February 6, 2013 Share Posted February 6, 2013 The module is being developed by myself and quicpf Link to comment Share on other sites More sharing options...
legacy12 Posted February 6, 2013 Share Posted February 6, 2013 What will be the price? Link to comment Share on other sites More sharing options...
monszaic concepts Posted February 6, 2013 Share Posted February 6, 2013 We agreed to charge the module at $10, however i don't know if we can set this price amount on Prestashop Addons, as the lowest possible is $29 for a module on Addons. So if that would be the case, then it will have to be $29... i will try to contact Prestashop team maybe they can allow the module to be sold for $10. 1 Link to comment Share on other sites More sharing options...
legacy12 Posted February 6, 2013 Share Posted February 6, 2013 That's perfect. Link to comment Share on other sites More sharing options...
siomosp Posted February 7, 2013 Share Posted February 7, 2013 Hello siomsop, Tonight i'm uploading the module to Prestashop Addons, but it will be 7 days until they approve it. I can implement the changes directly in your files if you want it within the next tens of minutes. Hello , i have reply to your PM Link to comment Share on other sites More sharing options...
monszaic concepts Posted February 8, 2013 Share Posted February 8, 2013 (edited) Hello guys, I've told you that i'm developing a module for this bug. After working whole day now and almost finshing to make it a "module" it turned out some variables don't get passed in an overwritten class and i get erronous results. So the solution instead of module fix is overwrite 4 files in 3 locations in Prestashop. With these changes you will be able to: - see the comments of the customer in his order - mark his comments as read ( previous fix didn't solved this issue) - see employer comments added, those that are hidden from the customer are marked with red text "Private" Most of these options were available but limited due to unknown prestashop-related reason. The price for these changes is $15. You just have to send a PM and i'll send you my paypal address. Once the payment is done i will give you the files and instructions where to upload them. It will be a 1-2 minute task for you.The changed files are safe and won't interfere with any existing code inside Prestashop. Please specify your Prestashop version so i will give you the correct files. Respectfully, Bogdan Kapsis Webdesign Edited February 8, 2013 by Kapsis Webdesign (see edit history) 1 Link to comment Share on other sites More sharing options...
siomosp Posted February 9, 2013 Share Posted February 9, 2013 The solution from Kapsis Webdesign works perefectly. Now i have personal order comments , to order details page. Thanks! 1 Link to comment Share on other sites More sharing options...
jimmyc Posted February 20, 2013 Share Posted February 20, 2013 (edited) Subbing to this thread. What a crazy mess this Improved system is. I've actually reported it as a bug after upgrading as the old pre1.5 messages show but not the new ones. Edited February 20, 2013 by jimmyc (see edit history) Link to comment Share on other sites More sharing options...
monszaic concepts Posted February 20, 2013 Share Posted February 20, 2013 Hello jimmyc, I m working on a bug that is related to Prestashop html entities, for an unknown reason something's wrong when trying to decode from the database, greek characters. Presashop has this issue on their Threads section also, but not in all the Thread Section. Are u interested in the fix ? Link to comment Share on other sites More sharing options...
webbusiness23 Posted March 4, 2013 Share Posted March 4, 2013 Hello jimmyc, I m working on a bug that is related to Prestashop html entities, for an unknown reason something's wrong when trying to decode from the database, greek characters. Presashop has this issue on their Threads section also, but not in all the Thread Section. Are u interested in the fix ? I'm interested in your module. I use 1.5.3.1 and i sent you a private message and waiting for your reply. Thanks! Link to comment Share on other sites More sharing options...
webbusiness23 Posted March 6, 2013 Share Posted March 6, 2013 Hello jimmyc, I m working on a bug that is related to Prestashop html entities, for an unknown reason something's wrong when trying to decode from the database, greek characters. Presashop has this issue on their Threads section also, but not in all the Thread Section. Are u interested in the fix ? Hello Kapsis Webdesign, i replied to your Private Message regarding the module. Please reply back. Thanks! Link to comment Share on other sites More sharing options...
hoplajetzt Posted March 8, 2013 Share Posted March 8, 2013 Hi, if you don't want to give some money for displaying comments in orders page, i'll give you a solution. It makes the display of the comments like prestashop < 1.5 Just modify the function of the Message class, Replace the function getMessageByOrderId by this one (on line 91) : public static function getMessagesByOrderId($id_order, $private = false, Context $context = null) { if (!Validate::isBool($private)) die(Tools::displayError()); if (!$context) $context = Context::getContext(); $m = Db::getInstance()->executeS(' SELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me FROM `'._DB_PREFIX_.'message` m LEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer` LEFT JOIN `'._DB_PREFIX_.'message_readed` mr ON mr.`id_message` = m.`id_message` AND mr.`id_employee` = '.(isset($context->employee) ? (int)$context->employee->id : '\'\'').' LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE m.`id_order` = '.(int)$id_order.' '.(!$private ? ' AND m.`private` = 0' : '').' GROUP BY m.id_message ORDER BY m.date_add DESC '); $o = Db::getInstance()->executeS(' SELECT ct.*, m.*, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM `'._DB_PREFIX_.'customer_thread` ct LEFT JOIN `'._DB_PREFIX_.'customer_message` m ON m.`id_customer_thread` = ct.`id_customer_thread` LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE ct.`id_order` = '.(int)$id_order.' ORDER BY ct.`date_add` DESC' ); return array_merge($o,$m); } Works fine ...and its free 13 Link to comment Share on other sites More sharing options...
Okidoki Posted March 8, 2013 Share Posted March 8, 2013 (edited) Worked! I replaced the codes in the file /classes/Message.php Thanks. Edited March 8, 2013 by Okidoki (see edit history) Link to comment Share on other sites More sharing options...
webbusiness23 Posted March 11, 2013 Share Posted March 11, 2013 Hi, if you don't want to give some money for displaying comments in orders page, i'll give you a solution. It makes the display of the comments like prestashop < 1.5 Just modify the function of the Message class, Replace the function getMessageByOrderId by this one (on line 91) : public static function getMessagesByOrderId($id_order, $private = false, Context $context = null) { if (!Validate::isBool($private)) die(Tools::displayError()); if (!$context) $context = Context::getContext(); $m = Db::getInstance()->executeS(' SELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me FROM `'._DB_PREFIX_.'message` m LEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer` LEFT JOIN `'._DB_PREFIX_.'message_readed` mr ON mr.`id_message` = m.`id_message` AND mr.`id_employee` = '.(isset($context->employee) ? (int)$context->employee->id : '\'\'').' LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE m.`id_order` = '.(int)$id_order.' '.(!$private ? ' AND m.`private` = 0' : '').' GROUP BY m.id_message ORDER BY m.date_add DESC '); $o = Db::getInstance()->executeS(' SELECT ct.*, m.*, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM `'._DB_PREFIX_.'customer_thread` ct LEFT JOIN `'._DB_PREFIX_.'customer_message` m ON m.`id_customer_thread` = ct.`id_customer_thread` LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE ct.`id_order` = '.(int)$id_order.' ORDER BY ct.`date_add` DESC' ); return array_merge($o,$m); } Works fine ...and its free The solution works perfectly. Thank you! 1 Link to comment Share on other sites More sharing options...
Okidoki Posted March 13, 2013 Share Posted March 13, 2013 Now my message box is showing errors like that: Notice: Undefined index: cfirstname in /var/www/vhosts/xxxxdocs/cache/smarty/compile/eefd78d74829cc54ce63030dc4021e3bd8487bc9.file.view.tpl.php on line 1282 Notice: Undefined index: clastname in /var/www/vhosts/xxxxx/httpdocs/cache/smarty/compile/eefd78d74829cc54ce63030dc4021e3bd8487bc9.file.view.tpl.php on line 1283 Link to comment Share on other sites More sharing options...
Shogun Distribution Posted March 14, 2013 Share Posted March 14, 2013 (edited) Thousand hoplajetzt thank you for this code work perfectly. Mais je crois que je peux remercier en français ca hoplajetzt, c'est de l'alsacien qui veut dire "Aller Maintenant". Donc, mille merci pour ce bout de code qui marche à merveille Edited March 14, 2013 by Shogun Distribution (see edit history) 1 Link to comment Share on other sites More sharing options...
CVpeet Posted March 14, 2013 Share Posted March 14, 2013 Thanks man this is awesome! Link to comment Share on other sites More sharing options...
hoplajetzt Posted March 18, 2013 Share Posted March 18, 2013 Mais je crois que je peux remercier en français ca hoplajetzt, c'est de l'alsacien qui veut dire "Aller Maintenant". Donc, mille merci pour ce bout de code qui marche à merveille Tu as tout bon 100% alsacien! Pour la solution que j'ai donnée, n'oublie pas de la placer dans un override si jamais tu as l'intention de faire des maj par la suite! For all, il you want to use the update system of prestashop, don't forget to put the function in an override class! Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted April 10, 2013 Share Posted April 10, 2013 (edited) In Prestashop > 1.5, If you want to show all comments / Messages in Order page in BO then just do Following Two steps... By doing that you can see all comments in order page 1) Add Following function to CustomerThread Class after getCustomerMessagesByOrderId Function.. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order; return Db::getInstance()->executeS($sql); } 2) And Change One line in File controllers/admin/AdminOrdersController.php From 'messages' => Message::getMessagesByOrderId($order->id, true), to 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), This is working fine and i have already implemented this.. Edited April 10, 2013 by divyeshp (see edit history) 3 Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 21, 2013 Author Share Posted April 21, 2013 hoplajetzt solution works but the messages displays the date without the time. This makes the messages sort in random order when both messages occur during the same day. Any fix? Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted April 23, 2013 Share Posted April 23, 2013 hoplajetzt solution works but the messages displays the date without the time. This makes the messages sort in random order when both messages occur during the same day. Any fix? In Prestashop > 1.5.4, If you want to show date with time also then.. Open view.tpl file in "your_admin/themes/default/template/controllers/orders/helpers/view/" And replace ( line 793 ) {l s='At'} <i>{dateFormat date=$message['date_add']} with {l s='At'} <i>{$message['date_add']} Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 23, 2013 Author Share Posted April 23, 2013 What about the sorting? The latest message should be displayed from top to bottom. Will this line fix that? (replying via smartphone now, sorry if this sounds lazy). Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted April 24, 2013 Share Posted April 24, 2013 What about the sorting? The latest message should be displayed from top to bottom. Will this line fix that? (replying via smartphone now, sorry if this sounds lazy). By default latest one should be shown at bottom... Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 24, 2013 Author Share Posted April 24, 2013 Is there way to sort the latest on top? It only makes sense since Paypal's message which is always the first message is at the bottom. Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted May 8, 2013 Share Posted May 8, 2013 Is there way to sort the latest on top? It only makes sense since Paypal's message which is always the first message is at the bottom. Are you using hoplajetzt's Solution ??? Link to comment Share on other sites More sharing options...
Pressed0024 Posted May 8, 2013 Author Share Posted May 8, 2013 Are you using hoplajetzt's Solution ??? Yes I did. What should I do now? Link to comment Share on other sites More sharing options...
sdi4x4 Posted June 14, 2013 Share Posted June 14, 2013 Yes I did. What should I do now? if you ask me, what you should do is to undo the changes and do the divyeshp solution, he is helping enough by providing his own solution already i did use his solution and it seems to work fine, also helpful the modification to display the message time in addition to date thanks divyeshp ! you helped this man today Link to comment Share on other sites More sharing options...
Pressed0024 Posted June 15, 2013 Author Share Posted June 15, 2013 By default latest one should be shown at bottom... Removed hoplajetzt's solution and used yours. Works out pretty neat! If there is a solution to reverse the order to show latest on top it would be great since when replying to customer in the message box, we want to be able to view the latest message while typing. Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted June 15, 2013 Share Posted June 15, 2013 Removed hoplajetzt's solution and used yours. Works out pretty neat! If there is a solution to reverse the order to show latest on top it would be great since when replying to customer in the message box, we want to be able to view the latest message while typing. To show latest message first, Just use solution that i have provided ( #61 ) and replace Following code public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order; return Db::getInstance()->executeS($sql); } With This One public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 1 Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted June 15, 2013 Share Posted June 15, 2013 It's a pain I can no longer see all the order comments in a single page. Which version of prestashop are you on??? Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted June 17, 2013 Share Posted June 17, 2013 Removed hoplajetzt's solution and used yours. Works out pretty neat! If there is a solution to reverse the order to show latest on top it would be great since when replying to customer in the message box, we want to be able to view the latest message while typing. Pressed0024, Are you able to get it work with comment #71 ???? Link to comment Share on other sites More sharing options...
barrystein Posted July 4, 2013 Share Posted July 4, 2013 hoplajetzt's solution maintains the order entry information in the message section of the back office. By order entry info I mean the avs info from your credit card processor, or information if you are entering the order manually. divyeshp solution does not show this original order entry info. if you ask me, what you should do is to undo the changes and do the divyeshp solution, he is helping enough by providing his own solution already i did use his solution and it seems to work fine, also helpful the modification to display the message time in addition to date thanks divyeshp ! you helped this man today Link to comment Share on other sites More sharing options...
bepped Posted July 5, 2013 Share Posted July 5, 2013 Hello, i have the following problem ,with both methods (i tried both). I get an error shown on every message, even if the message is shown: Notice: Undefined index: is_new_for_me in [path..]/cache/smarty/compile/6c2173f7f305857a7cdf3a4055e1fab861a4406d.file.view.tpl.php on line 1267 Il 11/04/2013 Link to comment Share on other sites More sharing options...
UKclearancecentre Posted July 10, 2013 Share Posted July 10, 2013 divyeshp solution worked for me, hopefully the prestashop devs will wake up and put this solution into the next release as it seems stupid not to have comments made on an order not showing up on the order itself Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted July 11, 2013 Share Posted July 11, 2013 Hello, i have the following problem ,with both methods (i tried both). I get an error shown on every message, even if the message is shown: Notice: Undefined index: is_new_for_me in [path..]/cache/smarty/compile/6c2173f7f305857a7cdf3a4055e1fab861a4406d.file.view.tpl.php on line 1267 Il 11/04/2013 Hey bepped, I think you have enabled debug that's why this notice is coming up.. You can disable this from file defines.inc.php in config folder.. and replace this define('_PS_MODE_DEV_', true); with.. define('_PS_MODE_DEV_', false); Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted July 11, 2013 Share Posted July 11, 2013 hoplajetzt's solution maintains the order entry information in the message section of the back office. By order entry info I mean the avs info from your credit card processor, or information if you are entering the order manually. divyeshp solution does not show this original order entry info. Hello barrystein, Can yo please clarify more??.. Not getting your point. Link to comment Share on other sites More sharing options...
anu88 Posted July 25, 2013 Share Posted July 25, 2013 Hello sir.... My problems is something different from other's. Problems is that the "order" is not showing back office of prestashop 1.5.4.1 I am very frustrated with it from last 2 weeks, i have posted our problems and searching everywhere but not found any solution . I have using latest version of klarna checkout for payment. Thanks in Advance. Link to comment Share on other sites More sharing options...
LeGastronome Posted August 20, 2013 Share Posted August 20, 2013 Merci l'alsacien!! Carrément plus utile comme ça Link to comment Share on other sites More sharing options...
Stefand Posted August 27, 2013 Share Posted August 27, 2013 Hi, I have def mode on false / display errors also on off. But getting this: Notice: Undefined index: is_new_for_me in [path..]/cache/smarty/compile/6c2173f7f305857a7cdf3a4055e1fab861a4406d.file.view.tpl.php on line 1267 Il 11/04/2013 Link to comment Share on other sites More sharing options...
jimmyc Posted August 31, 2013 Share Posted August 31, 2013 Hi, if you don't want to give some money for displaying comments in orders page, i'll give you a solution. It makes the display of the comments like prestashop < 1.5 Just modify the function of the Message class, Replace the function getMessageByOrderId by this one (on line 91) : public static function getMessagesByOrderId($id_order, $private = false, Context $context = null) { if (!Validate::isBool($private)) die(Tools::displayError()); if (!$context) $context = Context::getContext(); $m = Db::getInstance()->executeS(' SELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me FROM `'._DB_PREFIX_.'message` m LEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer` LEFT JOIN `'._DB_PREFIX_.'message_readed` mr ON mr.`id_message` = m.`id_message` AND mr.`id_employee` = '.(isset($context->employee) ? (int)$context->employee->id : '\'\'').' LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE m.`id_order` = '.(int)$id_order.' '.(!$private ? ' AND m.`private` = 0' : '').' GROUP BY m.id_message ORDER BY m.date_add DESC '); $o = Db::getInstance()->executeS(' SELECT ct.*, m.*, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM `'._DB_PREFIX_.'customer_thread` ct LEFT JOIN `'._DB_PREFIX_.'customer_message` m ON m.`id_customer_thread` = ct.`id_customer_thread` LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` WHERE ct.`id_order` = '.(int)$id_order.' ORDER BY ct.`date_add` DESC' ); return array_merge($o,$m); } Works fine ...and its free I use this all the time after upgrades and works every time. Thanks Not sure about the very latest prestashop updated just the other day, But anyway Just wanted to say thanks again. Link to comment Share on other sites More sharing options...
Maria_M Posted September 7, 2013 Share Posted September 7, 2013 To show latest message first, Just use solution that i have provided ( #61 ) and replace Following code public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order; return Db::getInstance()->executeS($sql); } With This One public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } problem with accents - ľščťžýáíéúôä Link to comment Share on other sites More sharing options...
shroom Posted October 1, 2013 Share Posted October 1, 2013 (edited) Quick bump as I have a similar issue with accents on v1.5.5.0. Edited October 1, 2013 by shroom (see edit history) Link to comment Share on other sites More sharing options...
ctrlsoluciones.com Posted November 18, 2013 Share Posted November 18, 2013 any solution? Link to comment Share on other sites More sharing options...
Pressed0024 Posted November 29, 2013 Author Share Posted November 29, 2013 In Prestashop > 1.5, If you want to show all comments / Messages in Order page in BO then just do Following Two steps... By doing that you can see all comments in order page 1) Add Following function to CustomerThread Class after getCustomerMessagesByOrderId Function.. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order; return Db::getInstance()->executeS($sql); } 2) And Change One line in File controllers/admin/AdminOrdersController.phpFrom 'messages' => Message::getMessagesByOrderId($order->id, true), to 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), This is working fine and i have already implemented this.. Got it working in 1.4.9.1. It doesn't seem to work now in 1.5.6.1. Any idea? Link to comment Share on other sites More sharing options...
Pressed0024 Posted November 29, 2013 Author Share Posted November 29, 2013 divyeshp's solution in 1.5.6.1 won't show order comments anymore. Have to use back hoplajetzt's solution. But that means we can't have latest order comment at the top. Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted November 30, 2013 Share Posted November 30, 2013 divyeshp's solution in 1.5.6.1 won't show order comments anymore. Have to use back hoplajetzt's solution. But that means we can't have latest order comment at the top. I will check and let you know how it works in 1.5.6.1 as i have not tested this in 1.5.6.1. Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted November 30, 2013 Share Posted November 30, 2013 (edited) divyeshp's solution in 1.5.6.1 won't show order comments anymore. Have to use back hoplajetzt's solution. But that means we can't have latest order comment at the top. Hello All, To show order comments on order detail page in back office in 1.5.6.1 you all just need to do following steps and you will done with that i have implemented and tested well on prestashop 1.5.6.1. 1) Open CustomerThread.php file from classes folder and add following function just after function getNextThread. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 2) Open AdminOrdersController.php file from controllers/admin folder and replace this line ( line #1368 ) 'messages' => Message::getMessagesByOrderId($order->id, true), with this code 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), 3) To show date and time both in messages open file view.tpl from your_Admin/themes/default/template/controllers/orders/helpers/view folder and change this line ( line # 780 ) {l s='At'} <i>{dateFormat date=$message['date_add']} with this code {l s='At'} <i>{$message['date_add']} Follow these threes steps and Enjoy!!! Edited November 30, 2013 by divyeshp (see edit history) 6 Link to comment Share on other sites More sharing options...
Pressed0024 Posted November 30, 2013 Author Share Posted November 30, 2013 Hello All, To show order comments on order detail page in back office in 1.5.6.1 you all just need to do following steps and you will done with that i have implemented and tested well on prestashop 1.5.6.1. 1) Open CustomerThread.php file from classes folder and add following function just after function getNextThread. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 2) Open AdminOrdersController.php file from controllers/admin folder and replace this line ( line #1368 ) 'messages' => Message::getMessagesByOrderId($order->id, true), with this line 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), Your solution works like a charm! I like how it also shows the corresponding Orders and Products at Customers>Customer Service>View. Are you a prestashop coder or merchant? 1 Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted November 30, 2013 Share Posted November 30, 2013 Your solution works like a charm! I like how it also shows the corresponding Orders and Products at Customers>Customer Service>View. Are you a prestashop coder or merchant? Yes, Prestashop Coder. Link to comment Share on other sites More sharing options...
a_smith Posted December 5, 2013 Share Posted December 5, 2013 thanks divyeshp Link to comment Share on other sites More sharing options...
Joleyy Posted January 8, 2014 Share Posted January 8, 2014 (edited) Actually we released a fix for this trough moduleform. We charge a small fee for the module, you can read more about this module here. Edited January 8, 2014 by Joleyy (see edit history) Link to comment Share on other sites More sharing options...
BIG PRINT Posted January 9, 2014 Share Posted January 9, 2014 Hello All, To show order comments on order detail page in back office in 1.5.6.1 you all just need to do following steps and you will done with that i have implemented and tested well on prestashop 1.5.6.1. 1) Open CustomerThread.php file from classes folder and add following function just after function getNextThread. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 2) Open AdminOrdersController.php file from controllers/admin folder and replace this line ( line #1368 ) 'messages' => Message::getMessagesByOrderId($order->id, true), with this code 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), 3) To show date and time both in messages open file view.tpl from your_Admin/themes/default/template/controllers/orders/helpers/view folder and change this line ( line # 780 ) {l s='At'} <i>{dateFormat date=$message['date_add']} with this code {l s='At'} <i>{$message['date_add']} Follow these threes steps and Enjoy!!! Hi, after installing your hack I have this message : Notice: Undefined index: is_new_for_me in/home/www/mon_site/cache/smarty/compile/d6/66/31/d666311337a7ad6beb4d8a07c053feb9aad5b3e2.file.view.tpl.phpon line 1271 > Notice: Undefined index: is_new_for_me in/home/www/mon_site/cache/smarty/compile/d6/66/31/d666311337a7ad6beb4d8a07c053feb9aad5b3e2.file.view.tpl.phpon line 1272 In a 1.5.6.1 version upgraded from 1.4.8.2. any idea? Thanks Link to comment Share on other sites More sharing options...
spott Posted January 16, 2014 Share Posted January 16, 2014 Thanks divyeshp Has some one made official bugreport also? I thinks this is serious bug and I hope PrestaShop team will fix it. Link to comment Share on other sites More sharing options...
Divyesh Prajapati Posted January 22, 2014 Share Posted January 22, 2014 Hi, after installing your hack I have this message : Notice: Undefined index: is_new_for_me in/home/www/mon_site/cache/smarty/compile/d6/66/31/d666311337a7ad6beb4d8a07c053feb9aad5b3e2.file.view.tpl.phpon line 1271 > Notice: Undefined index: is_new_for_me in/home/www/mon_site/cache/smarty/compile/d6/66/31/d666311337a7ad6beb4d8a07c053feb9aad5b3e2.file.view.tpl.phpon line 1272 In a 1.5.6.1 version upgraded from 1.4.8.2. any idea? Thanks Hello Big Print, Is your debug mode is on in defines.inc.php file in config folder? Link to comment Share on other sites More sharing options...
Seirios Posted January 22, 2014 Share Posted January 22, 2014 Hi divyeshp, The following code public static function getCustomerMessagesByOrderId($id_order){$sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastnameFROM '._DB_PREFIX_.'customer_thread ctLEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_threadLEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer`LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employeeWHERE id_order = '.(int)$id_order;return Db::getInstance()->executeS($sql);} What file do i have to change? (i am on 1.5.4.1) Link to comment Share on other sites More sharing options...
maghribiz Posted January 27, 2014 Share Posted January 27, 2014 Hello All, To show order comments on order detail page in back office in 1.5.6.1 you all just need to do following steps and you will done with that i have implemented and tested well on prestashop 1.5.6.1. 1) Open CustomerThread.php file from classes folder and add following function just after function getNextThread. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 2) Open AdminOrdersController.php file from controllers/admin folder and replace this line ( line #1368 ) 'messages' => Message::getMessagesByOrderId($order->id, true), with this code 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), 3) To show date and time both in messages open file view.tpl from your_Admin/themes/default/template/controllers/orders/helpers/view folder and change this line ( line # 780 ) {l s='At'} <i>{dateFormat date=$message['date_add']} with this code {l s='At'} <i>{$message['date_add']} Follow these threes steps and Enjoy!!! Dear Friend, I would like to thank you for your solution, it is working fine on ps 1.5.6.1; We would like to update to 1.5.6.2, will this Smart solution still be compatible? I would like also to join my voice to others that are complaining with the the decision to move the listing of the orders comments to the SAV section, and hide it from the page orders. I really don't know the reason why they have made this decision, but if they want to resolve an issue, they have resolved it by creating another issue. Anyway, thanks to divyeshp again. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted January 29, 2014 Share Posted January 29, 2014 Hy all, Thanks for the fix ! I have a question : can i add a simple checkbox or something to mark a message as solved/red/fixed ? THX ! Link to comment Share on other sites More sharing options...
tashkas Posted February 12, 2014 Share Posted February 12, 2014 (edited) i get this error in order i use 1.5.6.2 Notice: Undefined index: is_new_for_me in/var/www/prestashop/cache/smarty/compile/fc/bd/a1/fcbda1d5741ea53f4d8add89f15f7105f0a74762.file.view.tpl.phpon line 1271> Notice: Undefined index: is_new_for_me in/var/www/prestashop/cache/smarty/compile/fc/bd/a1/fcbda1d5741ea53f4d8add89f15f7105f0a74762.file.view.tpl.phpon line 1272 <div style="overflow:auto; width:400px;" <?php if ($_smarty_tpl->tpl_vars['message']->value['is_new_for_me']){?>class="new_message"<?php }?>> <?php if (($_smarty_tpl->tpl_vars['message']->value['is_new_for_me'])){?> Edited February 12, 2014 by tashkas (see edit history) Link to comment Share on other sites More sharing options...
devilsown Posted February 13, 2014 Share Posted February 13, 2014 If only prestashop would fix this issue. Why leave the order to see the notes for it ? Link to comment Share on other sites More sharing options...
Alexandre de Lyon Posted February 14, 2014 Share Posted February 14, 2014 i get this error in order i use 1.5.6.2 Notice: Undefined index: is_new_for_me in/var/www/prestashop/cache/smarty/compile/fc/bd/a1/fcbda1d5741ea53f4d8add89f15f7105f0a74762.file.view.tpl.phpon line 1271 > Notice: Undefined index: is_new_for_me in/var/www/prestashop/cache/smarty/compile/fc/bd/a1/fcbda1d5741ea53f4d8add89f15f7105f0a74762.file.view.tpl.phpon line 1272 <div style="overflow:auto; width:400px;" <?php if ($_smarty_tpl->tpl_vars['message']->value['is_new_for_me']){?>class="new_message"<?php }?>> <?php if (($_smarty_tpl->tpl_vars['message']->value['is_new_for_me'])){?> Hello, I have the same problem on 1.5.6.2. Did you find a solution ? Thanks Link to comment Share on other sites More sharing options...
meditation Posted February 17, 2014 Share Posted February 17, 2014 up, I have also this problem in 1.5.6.2, anyone can help? best regards Link to comment Share on other sites More sharing options...
jimmyc Posted February 22, 2014 Share Posted February 22, 2014 Hello All, To show order comments on order detail page in back office in 1.5.6.1 you all just need to do following steps and you will done with that i have implemented and tested well on prestashop 1.5.6.1. 1) Open CustomerThread.php file from classes folder and add following function just after function getNextThread. public static function getCustomerMessagesByOrderId($id_order) { $sql = 'SELECT ct.*,cm.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname FROM '._DB_PREFIX_.'customer_thread ct LEFT JOIN '._DB_PREFIX_.'customer_message cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer` c ON ct.`id_customer` = c.`id_customer` LEFT JOIN '._DB_PREFIX_.'employee e ON cm.id_employee = e.id_employee WHERE id_order = '.(int)$id_order.' ORDER BY cm.id_customer_message DESC'; return Db::getInstance()->executeS($sql); } 2) Open AdminOrdersController.php file from controllers/admin folder and replace this line ( line #1368 ) 'messages' => Message::getMessagesByOrderId($order->id, true), with this code 'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true), 3) To show date and time both in messages open file view.tpl from your_Admin/themes/default/template/controllers/orders/helpers/view folder and change this line ( line # 780 ) {l s='At'} <i>{dateFormat date=$message['date_add']} with this code {l s='At'} <i>{$message['date_add']} Follow these threes steps and Enjoy!!! Anyone tested this in 1.5.6.2 Or is there another solution to showing customer order messages in the order page. Link to comment Share on other sites More sharing options...
jimmyc Posted February 22, 2014 Share Posted February 22, 2014 looks like it does work in 1.5.6.2 i made a mistake inseting the code but i can confirm placed correcctly it seems to work well. Thanks Link to comment Share on other sites More sharing options...
muhajiri89 Posted February 23, 2014 Share Posted February 23, 2014 Quick bump as I have a similar issue with accents on v1.5.5.0. http://www.maxbet212.com/ http://www.maxbet212.com/agen-bola-sbobet-terpercaya/ http://www.maxbet212.com/agen-ibcbet-online-terpercaya/ http://www.maxbet212.com/bandar-bola-online-terbaik/ http://www.maxbet212.com/agen-sbobet-casino/ http://www.maxbet212.com/2012/07/asiapoker77/ Link to comment Share on other sites More sharing options...
lmarcelocc Posted February 25, 2014 Share Posted February 25, 2014 It's working good in 1.5.6.2 Thanks for sharing your solution Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now