Jump to content

[REZOLVAT] Mesaje Comanda BackOffice


Recommended Posts

Dupa un upgrade la versiunea 1.562

 

Daca adaug eu sau un angajat un mesaj(comentariu) la o comanda in BO nu se afiseaza tot pe aceeasi pagina ci apare doar in sectiunea Serviciu Clienti.

Daca clientul adauga, atunci aparare.

 

In versiunea anterioara 1.4 aparea comentariul adaugat la comanda pe pagina comenzii.

 

Cum pot "repara"/face sa mearga?

post-60481-0-11670100-1392963420_thumb.png

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

OK, am rezolvat problema.

Am gasit pe forumul englezesc.

 

1) Deschide CustomerThread.php din folderul classes si adaugi functia de mai jos chiar dupa functia 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) Deschide AdminOrdersController.php din folderul controllers/admin si inlocuiesti linia #1368

'messages' => Message::getMessagesByOrderId($order->id, true),

Cu aceasta

'messages' => CustomerThread::getCustomerMessagesByOrderId($order->id, true),

3) Pentru a afisa timpul si data in mesaje intra in view.tpl din folderul Admin-ul tau/themes/default/template/controllers/orders/helpers/view si schimba linia # 780

{l s='At'} <i>{dateFormat date=$message['date_add']}

Cu acesta

{l s='At'} <i>{$message['date_add']}

Trebuie sa mearga, eu am incercat pe un prestashop 1.5.6.2 si merge.

Link to comment
Share on other sites

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