uc_order, inventory api, stock control and order editing

Posts: 57
Joined: 01/23/2008
Bug Finder

Hi all,

I am modifying the stock control basing in the inventory api contrib. I have a stocklevels modification that uses the uc_product_stock table (for sync with the official stock purposes) and controls the stock (TR has a copy of this modification), but I've noticed that when an order is modified or created by a admin (admin/store/orders/__/edit), there are some actions that aren't under stock control:

- add items to the list
- remove items from the list, using the ajax remove button or the remove check of the form

I've modified the uc_order module for including this stock updates where necessary, basically I've added calls to the uc_stocklevels_adjust_stock function in all these places.

Any suggestion for improving my solution are appreciated

(attached is a cvs diff of the module)

Thanks!

AttachmentSize
diff_uc_order.diff1005 bytes
Posts: 18
Joined: 03/16/2008

I guess you're using only the 'Simple Stock Levels' module which blocks the ordering of a product when the inventory level reaches 0. This module is very useful but it doesn't provide any reports, so I'm using the 'Stock' module in addition, so I can instantly check my stock levels and receive notifications. The 'Stock' module has the same - bug, when you edit an order or add a new one with admin account, the stock levels are not touched.

Posts: 57
Joined: 01/23/2008
Bug Finder

Hi

I am using the simple stock levels for a complete tracking of the inventory, and also i have the stock module configured for stock alerts, but I think that the bug is really in order module, which doesn't update stock when you manage orders from admin screen. I mean, without changing order module, you haven't control about admin manage of stock... Sad or at least, I could not find it!

You are right in that my solution is not compatible without having the inventory module, and is not the most desirable situation, another suggestion are happily accepted!!! Smiling