Following this tutorial https://code.tutsplus.com/tutorials/create-a-custom-shipping-method-in-magento--cms-23747 i have created a new shipping method

enter image description here

and the price, following the tutorial, has been set up in the file config.xml

<?xml version="1.0"?>
        <name>Demo Shipping Method One</name>
        <title>Demo Shipping Method</title>

The new shipping method appear to work fine, without any kind of problem, but if i try to set up a checkout rule to put the shipping method free for order over 30,00€ the rules is not applied

enter image description here

enter image description here

Maybe is a problem of the new shipping method?....or maybe i wrong something in the rule?

1 Answer 1


I made it to work in this way finally, Go to your Model file mine is Carrier.php and inside public function collectRates(Mage_Shipping_Model_Rate_Request $request) you have to add the code below:

    if ($request->getFreeShipping()) {
         *  If the request has the free shipping flag,
         *  append a free shipping rate to the result.
        $freeShippingRate = $this->_getFreeShippingRate();

After that, you have to add allow the free method inside the public function getAllowedMethods() as below:

    return array(
        'standard'    =>  'Standard Method',
        'free_shipping' => 'Free Shipping', //Add this one into your array

After that you have to add a new function for the free shipping of course as below:

protected function _getFreeShippingRate()
    /** @var Mage_Shipping_Model_Rate_Result_Method $rate */
    $rate = Mage::getModel('shipping/rate_result_method');

    $rate->setCarrierTitle('Envato'); //Change with your carrier name
    $rate->setMethodTitle('Free Shipping');

    return $rate;

When you finish this edits you will find that cart price rules with free shipping option will be applied normally on your custom shipping method.

Please accept it as Answer, I was trying to get it work for 2 months like you, and just fixed it yesterday.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.