Пример #1
0
 /**
  * Adds a massaction print the shipping labels
  *
  * @param Mage_Adminhtml_Block_Sales_Order_Grid $block
  *
  * @return $this
  */
 protected function _addMassaction($block)
 {
     $helper = Mage::helper('tig_myparcel');
     $adminhtmlHelper = Mage::helper('adminhtml');
     /**
      * Add the print labels mass action.
      */
     $block->getMassactionBlock()->addItem('myparcel_print_labels', array('label' => $helper->__('MyParcel - Print shipping labels'), 'url' => $adminhtmlHelper->getUrl('adminhtml/myparcelAdminhtml_shipment/massPrintShipmentLabels'), 'additional' => array('type_consignment' => array('name' => 'type_consignment', 'type' => 'select', 'options' => array(TIG_MyParcel2014_Model_Shipment::TYPE_NORMAL => $helper->__('Normal'), TIG_MyParcel2014_Model_Shipment::TYPE_LETTER_BOX => $helper->__('Letterbox'), TIG_MyParcel2014_Model_Shipment::TYPE_UNPAID => $helper->__('Unpaid'))), 'create_consignment' => array('name' => 'create_consignment', 'type' => 'hidden', 'value' => 1))));
     return $this;
 }