Reputation: 1599
OK my problem is that my client would like their shipping carrier 'Colissimo' to appear in the drop down box for Carrier when creating the Shipment document in Admin of magento. One of the values in the dropdown is Custom Value. Is there any way of editing this to 'Colissimo'?
Upvotes: 3
Views: 3992
Reputation: 4009
The file to modify is app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create. You should make a local version of it (app/code/local/Mage/Adminhtml/Block/Sales/Order/Shipment/Create) before making any changes and do all the changes in this local copy.
Inside you will find a getCarriers() function, which is where you need to insert the name of the carrier.
public function getCarriers()
{
$carriers = array();
$carrierInstances = Mage::getSingleton('shipping/config')->getAllCarriers(
$this->getShipment()->getStoreId()
);
//you can change 'Custom Value' to 'Colissimo' and that should be it.
$carriers['custom'] = Mage::helper('sales')->__('Custom Value');
foreach ($carrierInstances as $code => $carrier) {
if ($carrier->isTrackingAvailable()) {
$carriers[$code] = $carrier->getConfigData('title');
}
}
return $carriers;
}
Upvotes: 2