示例#1
0
 /**
  * Returns array to be used in multiselect on back-end
  *
  * @return array
  */
 public function toOptionArray()
 {
     $configData = $this->_shippingDhl->getCode($this->_code);
     $arr = array();
     foreach ($configData as $code => $title) {
         $arr[] = array('value' => $code, 'label' => $title);
     }
     return $arr;
 }
 /**
  * Define params and variables
  *
  * @return void
  */
 public function _construct()
 {
     parent::_construct();
     $this->setInch($this->carrierDhl->getCode('unit_of_dimension_cut', 'I'));
     $this->setCm($this->carrierDhl->getCode('unit_of_dimension_cut', 'C'));
     $this->setHeight($this->carrierDhl->getCode('dimensions', 'height'));
     $this->setDepth($this->carrierDhl->getCode('dimensions', 'depth'));
     $this->setWidth($this->carrierDhl->getCode('dimensions', 'width'));
     $kgWeight = 70;
     $this->setDivideOrderWeightNoteKg(__('Select this to allow DHL to optimize shipping charges by splitting the order if it exceeds %1 %2.', $kgWeight, 'kg'));
     $weight = round($this->carrierHelper->convertMeasureWeight($kgWeight, \Zend_Measure_Weight::KILOGRAM, \Zend_Measure_Weight::POUND), 3);
     $this->setDivideOrderWeightNoteLbp(__('Select this to allow DHL to optimize shipping charges by splitting the order if it exceeds %1 %2.', $weight, 'pounds'));
     $this->setTemplate('unitofmeasure.phtml');
 }