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"?>
<config>
<modules>
<Custom_Shipping>
<active>true</active>
<codePool>local</codePool>
</Custom_Shipping>
</modules>
</config>
in Model Folder Observer.php
<?php
class Custom_Shipping_Model_Observer(){
public function salesOrderShipmentSaveBefore($observer)
{
$shipment = $observer->getShipment();
$order = $shipment->getOrder();
$storeId = $order->getStore()->getStoreId();
die('test');
}
}
ann etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Custom_Shipping>
<version>1.0</version>
</Custom_Shipping>
</modules>
<global>
<events>
<sales_order_shipment_save_before>
<observers>
<shipping>
<type>singleton</type>
<class>shipping/observer</class>
<method>salesOrderShipmentSaveBefore</method>
</shipping>
</observers>
</sales_order_shipment_save_before>
</events>
</global>
</config>