I have similar issue with OC2.0.3.1.
There is a strange issue with product quantity subtraction. If I select ’Process’ in admin-> Extensions-> Payments -> Order status, the quantity decrease when I get an order. It is ok.
But when I update order status to shipped, quantity reset to earlier status. I have tested it more time and I am sure this is existing. Is there any fix or good setting for this? I usually update my orders because I can follow my orders according their status. I would like to update my order status without the system automaticaly increase the product stock.
There is a strange issue with product quantity subtraction. If I select ’Process’ in admin-> Extensions-> Payments -> Order status, the quantity decrease when I get an order. It is ok.
But when I update order status to shipped, quantity reset to earlier status. I have tested it more time and I am sure this is existing. Is there any fix or good setting for this? I usually update my orders because I can follow my orders according their status. I would like to update my order status without the system automaticaly increase the product stock.
I guess I found the solution.
I have to select the correct order options in Admin->System->Settings->Option->Processing order status and Complete order status. If you select an ordering option that is not checked in Processing order list, the quantity will set the earlier value.
I have to select the correct order options in Admin->System->Settings->Option->Processing order status and Complete order status. If you select an ordering option that is not checked in Processing order list, the quantity will set the earlier value.
In the course of the experiments I found that different variants of choices lead to different results. For example:
"Complete" + "Pending" = "Out of stock"
"Complete" + "Processing" ( or "Processed" ) = "2-3 Days"
Where can I find all possible variants of choices and their results?
"Complete" + "Pending" = "Out of stock"
"Complete" + "Processing" ( or "Processed" ) = "2-3 Days"
Where can I find all possible variants of choices and their results?
Hi, I thing it works logically.
The selected items in in Admin->System->Settings->Option->Processing order status will decrease the stock. The unselected items will reset to original state.
It is same in Complete order status settings, too.
My settings:
Processing status:
1. selected: Paid, Pending, Processing, Shipped, prepared for shipping, waiting for payment, waiting for supply, etc
2. unselected: cancelled, refunded, change, chargeback, failed, done
Complete order status settings:
1. selcted: only the Done
2. Others unselected.
It works for me.
The selected items in in Admin->System->Settings->Option->Processing order status will decrease the stock. The unselected items will reset to original state.
It is same in Complete order status settings, too.
My settings:
Processing status:
1. selected: Paid, Pending, Processing, Shipped, prepared for shipping, waiting for payment, waiting for supply, etc
2. unselected: cancelled, refunded, change, chargeback, failed, done
Complete order status settings:
1. selcted: only the Done
2. Others unselected.
It works for me.
It would be easier to understand, how all this works, if, finally, someone up TOP would decide, to
create a complete Owners Manual. It's been just about a Year now (October 1, 2014), since it's first debut...
Very unique..., for something, different to handle, in so much, to it's predecessor.
(just thinking)
Ernie
PS: ...exept for iSense Lab's nice OC2 Info, just to mention it:
https://isenselabs.com/books/getacopy/47
create a complete Owners Manual. It's been just about a Year now (October 1, 2014), since it's first debut...
Very unique..., for something, different to handle, in so much, to it's predecessor.
(just thinking)
Ernie
PS: ...exept for iSense Lab's nice OC2 Info, just to mention it:
https://isenselabs.com/books/getacopy/47
Last edited by IP_CAM on Sun Sep 27, 2015 11:33 am, edited 1 time in total.
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
In catalog/model/checkout/order.php file,
find:
add after:
This should resolved the problem.
find:
Code: Select all
// If order status in the complete range create any vouchers that where in the order need to be made available.
if (in_array($order_info['order_status_id'], $this->config->get('config_complete_status'))) {
// Send out any gift voucher mails
$this->load->model('checkout/voucher');
$this->model_checkout_voucher->confirm($order_id);
}
Code: Select all
if (!empty($order_info['order_id']) && !empty($order_info['order_status_id']) && (int)$order_info['order_status_id'] == (int)$this->config->get('config_complete_status_id')) {
$order_product_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_product` WHERE `order_id` = '" . (int)$order_info['order_id'] . "' GROUP BY `product_id`");
if ($order_product_query->num_rows) {
foreach ($order_product_query->rows as $product) {
$this->db->query("UPDATE `" . DB_PREFIX . "product` SET `quantity` = 'quantity - 1' WHERE `product_id` = '" . (int)$product['product_id'] . "' AND `quantity` > '0'");
}
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Post edited above.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: Google [Bot] and 40 guests