Quote Originally Posted by balihr View Post
Yes, and this is exactly the interesting part where you get some fun.
As lat9 mentioned, it has nothing to do with OPC. Qty check and subtraction happens during checkout_process (includes/modules/checkout_process.php), or includes/classes/order.php to be exact. I'd use the notifier mentioned earlier, but you might prefer the ones found in create_add_products() function. Or just modify that function if you're happy with modifying core file, although the observer approach helps during upgrades and maintenance.
Your observer (or hack) could then update qty1 and qt2 based on your custom logic (you'll need to come up with that, sorry), and Zen Cart will process the main quantity anyway. If you're not updating qty1 and qty2 from anywhere else, products_quantity will always match qty1+qty2.
Balihr,
Thank you for detailed directions.
I came up with another approach and I think it will work better instead of customizing core files. I am going to give it a try in next few days and will post update.
I am thinking to use SBA and customize it as it will allow manage qty for both locations and it is also part of GPSF so data will be included in it auto.