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

Shipping Extension - Min/Max Limits [SOLVED]
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Okay, so I just modified my extension (http://tinyurl.com/cw6qul) to include the ability to set “per order” or “per item” for each option but now I’m trying to give the ability to set a price range for each one as well.

I’m looking at the free shipping method as a model to build this part, and I’m not getting errors, but whatever I set doesn’t seem to effect the frontend.

My carrier php file includes the following:

public function collectRates(Mage_Shipping_Model_Rate_Request $request)
    
{
        
...

        for(
$i 0$i <= 10$i++)
        
{
        
if ($packageValue >= $this->getConfigData('min_shipping'.$i) && $packageValue >= $this->getConfigData('max_shipping'.$i)) 
        $allow 
= ($request->getmultiflat()); 
        
}

    
...
        
}

        
return $result
    
}

    
...
}
?>

And my system.xml includes this:

<min_shipping1 translate="label">
              <
label>• Minimum order amount</label>
              <
frontend_type>text</frontend_type>
              <
sort_order>7</sort_order>
              <
show_in_default>1</show_in_default>
              <
show_in_website>1</show_in_website>
              <
show_in_store>0</show_in_store>
            </
min_shipping1>
            <
max_shipping1 translate="label">
              <
label>• Maximum order amount</label>
              <
frontend_type>text</frontend_type>
              <
sort_order>7</sort_order>
              <
show_in_default>1</show_in_default>
              <
show_in_website>1</show_in_website>
              <
show_in_store>0</show_in_store>
            </
max_shipping1>

Any idea what might be missing? If you want to see the full files I can PM them to anyone who wants to take a serious look at it. I’m still troubleshooting but it’d be helpful if anyone can help navigate me in the right direction. It’s hard without an error message.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Hm, the thought just occurred to me that it’s not allowing specific methods with that function but the whole extension ...

Here’s the new php snip ...

if ($packageValue >= $this->getConfigData('min_shipping'.$i) && $packageValue >= $this->getConfigData('max_shipping'.$i)) 
            $allow 
= ($request->getmsmultiflat('name'.$i)); 
        
}

Still no dice. Displays them all no matter what.

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