Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Force Shipping Options
 
webpixie
Jr. Member
 
Total Posts:  28
Joined:  2009-07-14
 

I have looked and can not find a solution to this problem. No extension will do what I need, and the only one I did find does a million things more and costs hundreds and hundreds of dollars.

I just need a small extension or fix so that if an item is flagged (with an attribute I guess) then it will only allow a specific shipping method or remove a specific shipping method.

Our site sells food products and we need to have it set to only ship 2 day air or faster for some of the items. So if the person has it in the cart only 2 day and overnight show up (or ground and 3 day are blocked - whichever is easiest).  We only use UPS and the only extension I saw would remove UPS all together, not just ground or 3 day.

Anyone have any suggestions. We make on the site the items need to ship 2 day, but no one ever selects it, so now we have to force it.

Any help would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
satish
Enthusiast
 
Total Posts:  812
Joined:  2008-03-24
34,mantri Sadan,Shivaji Nagar,Nagpur,MS,India 4400
 
webpixie - 01 September 2011 12:24 PM

I have looked and can not find a solution to this problem. No extension will do what I need, and the only one I did find does a million things more and costs hundreds and hundreds of dollars.

I just need a small extension or fix so that if an item is flagged (with an attribute I guess) then it will only allow a specific shipping method or remove a specific shipping method.

Our site sells food products and we need to have it set to only ship 2 day air or faster for some of the items. So if the person has it in the cart only 2 day and overnight show up (or ground and 3 day are blocked - whichever is easiest).  We only use UPS and the only extension I saw would remove UPS all together, not just ground or 3 day.

Anyone have any suggestions. We make on the site the items need to ship 2 day, but no one ever selects it, so now we have to force it.

Any help would be greatly appreciated.

Look at this code from class Mage_Shipping_Model_Carrier_Flatrate:
here you have foreach ($request->getAllItems() as $item) {
In this foreach you need to check and it you fins a product with attributes then you can return false and this shipping will not get added.

Similar code will be there in shipping modules.

**************************************************

public function collectRates(Mage_Shipping_Model_Rate_Request $request)
{
if (!$this->getConfigFlag(’active’)) {
return false;
}

$freeBoxes = 0;
if ($request->getAllItems()) {
foreach ($request->getAllItems() as $item) {

if ($item->getProduct()->isVirtual() || $item->getParentItem()) {
continue;
}

if ($item->getHasChildren() && $item->isShipSeparately()) {
foreach ($item->getChildren() as $child) {
if ($child->getFreeShipping() && !$child->getProduct()->isVirtual()) {
$freeBoxes += $item->getQty() * $child->getQty();
}
}
} elseif ($item->getFreeShipping()) {
$freeBoxes += $item->getQty();
}
}
}

*****************************************

 
Magento Community Magento Community
Magento Community
Magento Community
 
webpixie
Jr. Member
 
Total Posts:  28
Joined:  2009-07-14
 

Thank you for the help. I think I can mess with the code to make this work, but I am not sure I could make it an extension.

Is there any extension developers out there that could knock this out. I don’t think $50 for this mod would be bad, I certainly would pay that, and I am sure many others would too from the looks of the forum posts I saw about it.  For someone who knows the shipping code it should be pretty simple.  You’d be the only one out there with a mod like this.

Any takers?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jpg5f2
Member
 
Avatar
Total Posts:  34
Joined:  2011-06-01
Chicago
 

This extension allows you to create flat rates based on product attributes, so should fit your criteria I believe.

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/17930/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top