I have found a great script that allows for quick inventory updating via a php script, and it does work well. I am able to just go by SKU, quantity, and set each as is_in_stock.

My question then becomes, we have two main warehouses, call them Main and West, would it be possibly to add a secondary inventory slot to each product, and via the same script with few adjustments, be able to upload two different values for each warehouse?

Implementation of the display would be simple enough as currently it is just:

$qty = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
if ($qty<=0) { ?>


<?php } else { ?>    

//Echo Quantity
<?php echo $qty; } ?>

<?php endif; ?>

And adding another slot could turn into (what I assume) just $qty_secondary with similar loading format.

As a side note, I see the work it goes through with each product, is it as optimized as it could be? It was created back in 2010, and I imagine a lot of things have changed since then and it could be changed for the better I'm sure.

System: Magento & PHP 5.6


Magento 1 does not natively support multi warehouse functionality.

It appears that it might have been planned, but stock_id is always 1 (the key on the cataloginventory_stock_item table is item_id (unique identifier), product_id and stock_id (which would identify the source in a MW implementation) - and although you can add a new source to the cataloginventory_stock table, Magento 1 wasn't built to support more than one stock source natively.

My advice would be to purchase an extension that handles multi warehousing - it will have everything covered such as setting up inventory sources, displaying inventory per source in admin, orders, returns, etc. It's quite a big thing.

In regards to a script - you can then use the extension's methods to implement an update script.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.