cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Inventory slots for Different warehouses

Multiple Inventory slots for Different warehouses

Hello!

 

I recently 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:

 

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

<?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.