好吧我的问题是我的客户希望他们的运输公司'Colissimo'出现在Carrier of magento中的Shipment文件的下拉框中。下拉列表中的一个值是Custom Value。有没有办法将其编辑为'Colissimo'?
答案 0 :(得分:2)
要修改的文件是app / code / core / Mage / Adminhtml / Block / Sales / Order / Shipment / Create。在进行任何更改之前,您应该创建它的本地版本(app / code / local / Mage / Adminhtml / Block / Sales / Order / Shipment / Create),并在本地副本中进行所有更改。
在里面你会找到一个getCarriers()函数,你需要在这里插入载体名称。
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;
}