When a customer comes to our store and goes to check out on multiple items, I need to write a module to calculate shipping based on several factors. I have determined from my research that the following should happen:
First, I need to separate the cart items into different orders for shipping calculation. I want the orders to be sorted by "vendor" attribute value. "Vendor" is an attribute that we added to the system that is applicable for all simple products. So say in the cart there is a pink shirt with "vendor" value "1", a pencil with "vendor" value "1", and a blue shirt with "vendor" value "2". All items with "vendor" value "1" need to be one order, while the item with "vendor" value "2" need to be a different order. I see this other question answers this dilemma, but then raises another. How do I do this but display the seperate orders as one order during checkout to customers and only collect payment once?
Second, I need to calculate shipping with Magento's default UPS and Fedex shipping functionalities but with an origin address that is determined by the "vendor" value number (stored in a separate database table). Any suggestions welcome!
I will probably have several questions, but the first ones are those in bold above.
UPDATE I decided it would be best to override the multiple shipments magento core module to do what I'm trying to do. Please help me find where and what to put to manipulate the multishipping Magento functionality to break up an order's items into shipments based on the "vendor" attribute! I'm struggling with this.