Jump to content

Edit History

kaleske

kaleske

19 hours ago, nikos83 said:

There's reported issue 

https://github.com/PrestaShop/PrestaShop/issues/22386

you can 
comment 
 

foreach ($history as $item) {
$statuses[] = new OrderStatusForViewing(
(int) $item['id_order_history'],
(int) $item['id_order_state'],
$item['ostate_name'],
$item['color'],
new DateTimeImmutable($item['date_add']),
(bool) $item['send_email'],
$item['employee_firstname'],
$item['employee_lastname']
);
}

in /public_html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php

But then you'll lost all the status changes history. I've read about this and in my case some of the orders and status changes are assigned to the user - who was deleted and its name last name are null - I was thinking about to put there some if statement but not done yet.

Here is my sql query:

UPDATE ps_order_history SET id_employee = '1' WHERE id_employee = '0'
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '31';
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '32';
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '33';

 

order state 50 I created my self in prestashop.

kaleske

kaleske

19 hours ago, nikos83 said:

There's reported issue 

https://github.com/PrestaShop/PrestaShop/issues/22386

you can 
comment 
 

foreach ($history as $item) {
$statuses[] = new OrderStatusForViewing(
(int) $item['id_order_history'],
(int) $item['id_order_state'],
$item['ostate_name'],
$item['color'],
new DateTimeImmutable($item['date_add']),
(bool) $item['send_email'],
$item['employee_firstname'],
$item['employee_lastname']
);
}

in /public_html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php

But then you'll lost all the status changes history. I've read about this and in my case some of the orders and status changes are assigned to the user - who was deleted and its name last name are null - I was thinking about to put there some if statement but not done yet.

Here is my sql query:

UPDATE ps_order_history SET id_employee = '1' WHERE id_employee = '0'
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '31';
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '32';
UPDATE ps_order_history SET id_order_state = '50' WHERE id_order_state = '33';

 

order state 50 I created my self in prestashop

×
×
  • Create New...