Jump to content

Stock quantity between warehouse not updated after order if quantity product order > quantity wahrehouse 1


Johan06

Recommended Posts

Hello,

Like a lot of us, I'm getting crazy with the Advanced stock management...

Here my problem with it :

I have 2 warehouses : warehouse 1 and warehouse 2

I have a product using multi-stock :

  • Quantity 2 in warehouse 1
  • Quantity 5 in warehouse 2

 

- A customer want to buy this product with quantity = 3

He place the order, but the stock didn't update.

 

- If the customer want to buy this product with quantity = 2

The order is placed and warehouse 1 get stock = 0, the stock is updated

 

As you can see, when the quantity of the product order is superior to the stock of warehouse 1, the problem appear and no stock get updated.

 

i use prestashop 1.6.0.14

 

anyone had this problem ? how to fix that ?

thanks in advance

 

Edit :

Found that it's in /classes/order/OrderHistory.php

it check only 1 warehouse and remove the product on only 1 warehouse

is it really working like this ? did anybody experimented this ?

 

						// gets the warehouse
                        $warehouse = new Warehouse($product['id_warehouse']);

                        // decrements the stock (if it's a pack, the StockManager does what is needed)
                        $manager->removeProduct(
                            $product['product_id'],
                            $product['product_attribute_id'],
                            $warehouse,
                            $product['product_quantity'],
                            Configuration::get('PS_STOCK_CUSTOMER_ORDER_REASON'),
                            true,
                            (int)$order->id,
                            0,
                            (int)$this->id_employee
                        );

 

 

EDIT 2 :

Ok i did myself custom modification.

But for me this advanced stock is not working well by default.

 

 

 

Edited by Johan06
more infos (see edit history)
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...