I am building a distribution management system. There are only a few products that all get shipped on pallets and each pallet is built to include 50 bags. No more, no less. Usually the customer orders a full pallet already set to 50 bags, but we do allow mixed pallets of multiple products as long as they total 50. So, when ordering, I want to make sure that when an order is created, calculated, and paid for, that the bag count on a mixed pallet is equal to 50.
I have created the usual order->shopping cart-> order items database and workflow. The customer can choose a product and enter the number of pallets and the number of bags and add that order item to the shopping cart. The process totals the $ values as the order items are add to the cart. Now I am trying to find a way to set up this kind of restriction for the # of bags when the order is created.
Has anyone done something like this in the past or have a solid example to share on how to accomplish this? Any ideas are also useful to helping me formulate a path. Thanks.