opencart 修改订单 信息(订单号,状态)
use doljoee;
---------------------------修改订单状态----------------------------
select order_id,order_status_id from oc_order;
select * from oc_order_status;(5是成功订单)
UPDATE `oc_order` SET `order_status_id` = '5' WHERE `order_id` =2009201667;
---------------------------修改订单下单时间和修改时间----------------------------
UPDATE `oc_order` SET `date_added` = '2020-09-20 01:18:11' WHERE `order_id` =2009201667;
UPDATE `oc_order` SET `date_modified` = '2020-09-20 01:18:11' WHERE `order_id` =2009201667;
UPDATE `oc_order` SET `date_added` = '2020-09-20 00:04:33' WHERE `order_id` =2009201666;
UPDATE `oc_order` SET `date_modified` = '2020-09-20 00:04:33' WHERE `order_id` =2009201666;
---------------------------修改订单号(注:order_id是int 且位数有限最大:2147483647,导致不能含字母和太多年月日)----------------------------
select * from oc_order where `order_id` =15;
select * from oc_order_option where `order_id` =15;
select * from oc_order_product where `order_id` =15;
select * from oc_order_total where `order_id` =15;
UPDATE `oc_order` SET `order_id` = '2009201832' WHERE `order_id` =2009201667;
UPDATE `oc_order_option` SET `order_id` = '2009201832' WHERE `order_id` =2009201667;
UPDATE `oc_order_product` SET `order_id` = '2009201832' WHERE `order_id` =2009201667;
UPDATE `oc_order_total` SET `order_id` = '2009201832' WHERE `order_id` =2009201667;
UPDATE `oc_order` SET `order_id` = '2009201667' WHERE `order_id` =2147483647;
UPDATE `oc_order_option` SET `order_id` = '2009201667' WHERE `order_id` =2147483647;
UPDATE `oc_order_product` SET `order_id` = '2009201667' WHERE `order_id` =2147483647;
UPDATE `oc_order_total` SET `order_id` = '2009201667' WHERE `order_id` =2147483647;
UPDATE `oc_order` SET `order_id` = 'BR2009200004281665' WHERE `order_id` =15;
UPDATE `oc_order_option` SET `order_id` = 'BR2009200004281665' WHERE `order_id` =15;
UPDATE `oc_order_product` SET `order_id` = 'BR2009200004281665' WHERE `order_id` =15;
UPDATE `oc_order_total` SET `order_id` = 'BR2009200004281665' WHERE `order_id` =15;
UPDATE `oc_order` SET `order_id` = 'BR2009200118063917' WHERE `oc_order`.`order_id` =16;
select * from oc_order where `order_id` =15;
---------------------------修改订单日期格式----------------------------
/admin/controller/sale/order.php
389行
// 'date_added' => date($this->language->get('datetime_format'), strtotime($result['date_added'])),
'date_added' => date('Y-m-d H:i:s', strtotime($result['date_added'])),
// 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])),
'date_modified' => date('Y-m-d H:i:s', strtotime($result['date_modified'])),
1184行
// $data['date_added'] = date($this->language->get('date_format_short'), strtotime($order_info['date_added']));
// $data['date_modified'] = date($this->language->get('date_format_short'), strtotime($order_info['date_modified']));
$data['date_added'] = date('Y-m-d H:i:s', strtotime($order_info['date_added']));
$data['date_modified'] = date('Y-m-d H:i:s', strtotime($order_info['date_modified']));