tags:

views:

316

answers:

2

Hi there,

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'?

Regards, Fiona

A: 

Probably too late for you, Fiona, but maybe someone else will benefit. 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;
}
silvo
A: 

Don't forget to also change the name in app/code/local/Mage/Sales/Order/Pdf/Abstract.php or else you can't print the invoices

martijn