Esempio n. 1
0
 /**
  * Get html for the MyParcel options
  *
  * @param TIG_MyParcel2014_Model_Shipment $myParcelShipment
  *
  * @return string
  */
 public function getCurrentOptionsHtml($myParcelShipment)
 {
     $options = array($this->__(ucfirst(str_replace('_', ' ', $myParcelShipment->getShipmentType()))));
     if ($myParcelShipment->getShipmentType() == 'normal') {
         if ($myParcelShipment->getHomeAddressOnly() == '1') {
             $options[] = $this->__('Home address only');
         }
         if ($myParcelShipment->getHomeAddressOnly() == '1') {
             $options[] = $this->__('Signature on receipt');
         }
         if ($myParcelShipment->getReturnIfNoAnswer() == '1') {
             $options[] = $this->__('Return if no answer');
         }
         if ($myParcelShipment->getInsuredAmount() > 0) {
             $options[] = $this->__('Insured up to €%s', $myParcelShipment->getInsuredAmount());
         }
         if ($myParcelShipment->getIsXL() == '1') {
             $options[] = $this->__('Large package');
         }
     }
     $htmlOptions = $this->__('status_' . $myParcelShipment->getStatus()) . ', ' . strtolower(implode(', ', $options));
     return $htmlOptions;
 }