Okay guys, I've been trying to figure this one out and not having much luck so I think I'm overlooking something. A while back I setup my shop to check two quantities (products_quantity AND products_rsr) to determine whether or not to show the sold out image or to allow it to add to the cart. products_rsr is updated hourly from my distributor's inventory. A few months ago I zeroed out products_rsr and stopped updating it and changed the cart to not allow you to checkout unless I had enough inventory in stock. I was getting too many orders for items that I could not obtain because too many orders were coming in during that hour. And other times I would have none but my distributor would have 1 and people would order 5. I'd like to open up special orders again but to do so I would like to make it to where you can only order up to the total quantity available from both quantities (products_quantity AND products_rsr) and I'm having trouble figuring that out.
I want to leave the cart like it is and not allow you to order more than available, but I want it to basically check both of those values and add them together to allow that quantity. I still want it to deduct the quantity from products_quantity just like it does now (even if it goes below zero to a negative number). This way if my distributor has 10 and someone orders 10 it will make my inventory -10 which should cancel out the distributor until their inventory updates the next hour. Then I can manually update my inventory when I place the order with the distributor. I feel this will be the best way to avoid not being able to fill orders. I realize there will still be times when it happens, but I don't see a foolproof way around it.
Any help would be greatly appreciated.
Also, I have it now where it flags "out of stock" items as ***Special Order***. If possible, I would still like it to do that if they are ordering more than the quantity in products_quantity. That's not a deal breaker though.
Bookmarks