This is an Inventory API, which hooks into Ubercart and provide a User Interface for inventory management while protect 'Inventor Manager' (business logic) which can be ether 3rd party or other Drupal modules, from changes in the UC code base. Included is a fully functional example IInventor Manager I've called 'Simple Stock Levels' which does basic stock level tracking.
The Simple Stock Levels module allows you to associate a 'quantity' with an SKU (tracking number, serial etc) and stops the purchase of products with that SKU if the quantity drops to zero. There is also 'Is Tracked' on/off switch for each product so you can turn tracking on and off for a product easily. Updates adjusts the stock levels when the order is updated in the admin backend.
Simple Stock Levels Manager isn't meant to cover all possible situations thats why I separated the business logic from the interface API. If the Simple Stock Levels Manager doesn't do exactly what you want you can modify it and then choose your custom manager to handle changes in stock. This is ideal id=f you have an external system that you want to integrate with Ubercart via SOAP or XML-RPC say.
Quick start guide
After Ãœbercart is installed:
1. Install the "Inventory API" and optionally the "Simple Stock Levels" Inventory Manager module at 'admin/build/modules' and which are grouped under 'Ubercart - Inventory'. If you have a custom Inventory Manager then install that instead of "Simple Stock Levels".
2. Select which Inventory Manager you will be using at 'admin/store/settings/inventory'
3. Create/Edit a product and you should get a 'Stock levels' panel on this form. If the product has attributes then you can enable tracking and set the quantity in stock on that products Adjustments tab.
- Fixed a bug which was not updating products without atributes when they submitted their the edit product form.
- Fixed the Ajax for IE6&7. Again.
- Fixed the Ajax for IE6&7.
- Added code to Simple Stock Level which removes stock level data when the product (node) is deleted (untested)
- Fixed a bug for product without attributes. The "add to cart" button gets disabled and says "Out of stock" now.
- Fixed a spelling mistake
- Simple Stock Levels Manager now updates the stock levels when an order updated or deleted in the administration backend interface.
- Made sure the fixes in 1.5 were uploaded
- Fixed a dependency bug that assumed the uc_attribute module was active.
- Fixed a HTML bug which forgot to close a DIV around the add to cart form
- Bug fix for default value thanks to c0psrul3
- Reworked Ajax status checking for products with attributes
- Intergration with the CSV Import module
- Fixed bug where the quantities were not getting decremented properly thanks to jetskier79 for posting a solution.
- Removed dependence on the "uc_attributes" module.
- Fixed an Ajax bug that was related to sites setup not in the root of the domain.