i want to create email method. if customer select free shipping method then admin and user both will get an custom email.

how to do that? need help.

there are two shipping . one is paid and second is free. if customer select free shipping method and place the order then admin and customer both will get email notification.

need help how to do that?

in module folder Custom_shipping.xml

   <?xml version="1.0"?>


in Model Folder Observer.php


   class Custom_Shipping_Model_Observer(){

    public function salesOrderShipmentSaveBefore($observer)

    $shipment = $observer->getShipment();
    $order = $shipment->getOrder();
    $storeId = $order->getStore()->getStoreId();




ann etc/config.xml

      <?xml version="1.0"?>
  • What is the exact problem? Feb 18 '14 at 13:53
  • i don't know what is the issue. i created this module and unfortunately it is not working. i want to send email to user if user place place the order using freeshipping. as you suggested to use observer and sales_order_shipment_save_before i just tried to create the observer but it isn't working. can you help me? Feb 19 '14 at 4:27
  • Is the code called? Is the file included? Does the module show up in the backend? magento.stackexchange.com/questions/428/… Feb 19 '14 at 13:34
  • yes . module show up in system >> configuration >> advanced. it is is enable. i don't know why it is not firing the action Feb 20 '14 at 11:19

The problem appears to be you are missing the model definition in your config.xml so the observer does not get called.

You have two options.

Either update <class>custom_shipping/observer</class> to use <class>Custom_Shipping_Model_Observer</class>

Or create the following section in your config.xml:


Thanks to Fabian for pointing out <shipping> is already in use :)

  • Don't use `shipping``, this is already used by Mage_Shipping :) May 21 '14 at 16:19
  • @FabianBlechschmidt opps :) May 21 '14 at 16:34

Hook into the event sales_order_shipment_save_before check wether the order has an ID, if no, check the method and if the method is free, then send an email.

Further informations:

  • what will be in overserver? Feb 18 '14 at 5:44
  • The check whether the shipment has an id (to check whether it is new and only send the mail once) and the mail sending Feb 18 '14 at 7:09
  • hi, i updated the question with the module i created. please have a look. i just created observer. but it is not working. need help Feb 18 '14 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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