Hello,
I was wondering why when i edit order it duplicate in the order table in mysql Database
It's weird that same order has more than order id because it's duplicated after editing
how to avoid duplicating orders?
How did you edit the order and how did you notice it duplicated?
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
Edited Order using the admin panelrjcalifornia wrote: ↑Tue Apr 30, 2019 12:17 pmHow did you edit the order and how did you notice it duplicated?
Sales tab -> Orders -> Edit " Next to view button "
I've noticed duplicated lines when i tried to export orders to xls file
it returned more than 10 orders while it's shown i have only 8 orders
so i checked the order table at mysql and it had 10 lines of orders
6 lines and 2 duplicated orders which i've edited
Not really.
Because when editing orders, they are not duplicated - in a default installation.
Maybe you have additional extensions installed?
It would be also helpfully, if you post the used OpenCart version (see Forum rules!).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
That's not normal, usually doesn't happen. Which extensions you have in your store?Lembo wrote: ↑Wed May 01, 2019 3:40 pmEdited Order using the admin panelrjcalifornia wrote: ↑Tue Apr 30, 2019 12:17 pmHow did you edit the order and how did you notice it duplicated?
Sales tab -> Orders -> Edit " Next to view button "
I've noticed duplicated lines when i tried to export orders to xls file
it returned more than 10 orders while it's shown i have only 8 orders
so i checked the order table at mysql and it had 10 lines of orders
6 lines and 2 duplicated orders which i've edited
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
if you look into the edit order code,
you will notice that the possibility of the edit from the admin panel creating a new order is there.
it can happen , when the session doesn't have the order_id.
You can debug more to find out.
you will notice that the possibility of the edit from the admin panel creating a new order is there.
it can happen , when the session doesn't have the order_id.
You can debug more to find out.
Code: Select all
if (!isset($this->session->data['order_id'])) {
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($order_data);
} else {
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
if ($order_info) {
$this->model_checkout_order->editOrder($this->session->data['order_id'], $order_data);
}
}
Wait, I don't think that can happen without an order_idshashank1992 wrote: ↑Wed Apr 27, 2022 4:31 pmif you look into the edit order code,
you will notice that the possibility of the edit from the admin panel creating a new order is there.
it can happen , when the session doesn't have the order_id.
You can debug more to find out.
Code: Select all
if (!isset($this->session->data['order_id'])) { $this->session->data['order_id'] = $this->model_checkout_order->addOrder($order_data); } else { $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']); if ($order_info) { $this->model_checkout_order->editOrder($this->session->data['order_id'], $order_data); } }
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
Who is online
Users browsing this forum: No registered users and 24 guests