Jump to content

Overcomplicated stock management system


RomSunZ

Recommended Posts

I'm testing current 1.7.3 version. And I don't like stock management system at all. Why and what purpose to store stocks in 3 different tables? 

1. Product-> quantity - updated from table stock_available

2.Stock -> id_stock - main key - what is purpose? You are finding stock by id_warehouse id_product and attribute anyway. And this key structure leads to possibility of having duplicated stock entries with the same warehouse, product and attribute. Table is using for warehouse managment.

3. Stock_available ->  same as in table stock strange key id_stock_available. Also have column depends_on_stock. If it is true, row will update stock from table stock, also from this table updating product.quantity.

So core engine have to sincronize all 3 tables spending calculation time for that.

Please can someone explain what is it all for? It is much simplier and straightforward to have just one table Stock which holds warehouse, product and attribute as key, and stock and price information. In simplier way you have only one default warehouse and make available stock calculation from there. Another way you have several warehouses and through front office (if you need that) grant the user right to select warehouse to work with (for example by choosing store or choosing city). In this case core engine works only with one table and there is no more needing to sincronize with anything else at all.

.

 

Edited by RomSunZ (see edit history)
  • Like 2
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...