Want to add the carrier name in dropdown same as default carriers in shipment admin panel, how can I set it ?
Please see picture
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityWant to add the carrier name in dropdown same as default carriers in shipment admin panel, how can I set it ?
Please see picture
each carrier must have a model associated to it that implements the interface Mage_Shipping_Model_Carrier_Interface
. This interface has 2 methods.
interface Mage_Shipping_Model_Carrier_Interface
{
/**
* Check if carrier has shipping tracking option available
*
* @return boolean
*/
public function isTrackingAvailable();
/**
* Get allowed shipping methods
*
* @return array
*/
public function getAllowedMethods();
}
You have to implement the method isTrackingAvailable
and make it return true
. IN the dropdown you see in the backend only the carriers that have tracking available are listed.
Add a new active/inactive carrier in config
<default>
<carriers>
<your_carrier>
<active>0|1</active>
<model>your_module/your_carrier</model>
<title>Your Carrier</title>
<name>your_carrier</name>
<price>0.00</price>
</your_carrier>
</carriers>
</default>
Then in your model your_module/your_carrier which extends Mage_Shipping_Model_Carrier_Abstract, rewrite the method isTrackingAvailable to return true:
public function isTrackingAvailable()
{
return true;
}