By default that isn't possible, you must, at least implement:
- A custom Shipping Method
- A custom Shipping Form for your method, to allow customer select different shipping method for each item.
- Create sales_quote_item and sales_order_item attributes to save customer method selection
Your custom shipping method must handle all that logic, you need to split all items/weights and calculate the individual/total shipping cost/price and eventually some combination too ie:
- item 1 by usps = $10.
- item 2 by usps = $10.
- item 1 and 2 by usps = $15
Your shipping method must be able to:
- Obtain the shipping cost/price from the others shipping methods (for each single or combination possible item selection)
- Save customer shipping selection to sales_quote_item
- Recalculate all that data in all further steps in checkout
- Save quote_item data to order_item
- Re-implement any other -parent- shipping method feature, like Api calls for pickup, packages generation or tracking number getters
Finally if you want to give your customers a good communication feedback, you should modify all "post place order" email and templates in order to display all that information.
IMO is a lot of work to do, and I can't figure out a real-life case in which such effort would by justified.
EDIT
I'm not totally sure, but a partial use of some dropship extension may help... I guess
If you want to add multiple shipping carriers, you need to setup the normal configuration:
app/code/YourPackage/YourModule/etc/config.xml
<default>
<carriers>
<your_carrier_code>
<active>0</active>
<model>YourPackage_YourModule_Model_Carrier_YourCarrier</model>
<title>Carrier Title</title>
<name>Carrier Name</name>
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
</your_carrier_code>
</carriers>
</default
In your system.xml
app/code/YourPackage/YourModule/etc/system.xml
Please note the "source_model" tag. You need to define this class in your module as well.
<sections>
<carriers>
<groups>
<your_carrier_code translate="label" module="yourmodule">
...
<fields><!-- You need this field, so you can enable/disable different carriers -->
<allowed_methods translate="label">
<label>Allowed Methods</label>
<frontend_type>multiselect</frontend_type>
<source_model>yourmodule/shipping_source_method</source_model>
<sort_order>170</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<can_be_empty>1</can_be_empty>
</allowed_methods>
</fields>
</your_carrier_code>
</groups>
</carriers>
</sections>>
Then, in your source model: YourPackage_YourModule_Model_Shipping_Source_Method (Note, this class no needs to extend any class, you just need the method: toOptionArray)
//You just need this method here:
public function toOptionArray()
{
//You can fetch them from a database, or define them here.
$shippingRates = array(
0 => array(
'code' => 'carrier_1_code',
'title' => 'Carrier 1 Title'
),
1 => array(
'code' => 'carrier_2_code',
'title' => 'Carrier 2 Title'
),
);
foreach ($shippingRates as $shippingRate) {
$arr[] = array('value'=>$shippingRate['code'], 'label'=>$shippingRate['title']);
}
return $arr;
}
Then, in your carrier model: YourPackage_YourModule_Model_Carrier_YourCarrier
//Define the allowed methods
public function getAllowedMethods()
{
//Fetch the methods from the config.
$allowed = array(
0 => array(
'code' => 'carrier_1_code',
'title' => 'Carrier 1 Title'
),
1 => array(
'code' => 'carrier_2_code',
'title' => 'Carrier 2 Title'
),
);
$arr = array();
foreach ($allowed as $rate) {
$arr[$rate['code']] = $rate['title'];
}
return $arr;
}
//Then in your collectRates method:
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
{
if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
return false;
}
$result = Mage::getModel('shipping/rate_result');
//Fetch the methods.
$allowedMethods = $this->getAllowedMethods();
foreach ($allowedMethods as $key => $title) {
//Here check your method(carrier) if it is valid.
//if is valid:
$method = Mage::getModel('shipping/rate_result_method');
$method->setCarrier('your_carrier_code');
$method->setCarrierTitle($this->getConfigData('title'));
$method->setMethod($key);
$method->setMethodTitle($title);
$method->setMethodDescription($title);
//Calculate shipping price for rate:
//$shippingPrice = $this->_calculateShippingPrice($key); //You need to implement this method.
$method->setCost($shippingPrice);
$method->setPrice($shippingPrice);
//Finally add the method to the result.
$result->append($method);
}
}
This way, when you enable this carrier from the System Configuration, it will show all methods (carriers) that are enabled as radio buttons on checkout, but they will also be shown in the Promotions rules, so you can setup different promotions depending on the shipping carrier.
Best Answer
You can use this extension as a base and develop a new one, however I think that it should work good in 1.7.x.x, also you can check this post and topic from magentocommerce forum
If you need an extension that is 100 compatible with 1.7 you can try paid extension Admin Based Shipping by WebShopApps that do exactly the same