delete = true; } /** * Displays additional buttons in orders list * * @param null|string $token BackOffice token */ public function displayListFooter($token = null) { echo ''; echo '
'; echo ' '; if (isset($this->_includeTab) && count($this->_includeTab)) echo '
';
elseif (isset($params['position']))
{
if ($this->_orderBy == 'position' AND $this->_orderWay != 'DESC')
{
echo '
';
echo '
'; }
else
echo (int)($tr[$key] + 1);
}
elseif (isset($params['image']))
{
// item_id is the product id in a product image context, else it is the image id.
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
// If it's a product image
if (isset($tr['id_image']))
{
$image = new Image((int)$tr['id_image']);
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$image->getExistingImgPath().'.'.$this->imageType;
}else
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)($tr['id_image']) : '').'.'.$this->imageType;
echo cacheImage($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
}
elseif (isset($params['icon']) AND (isset($params['icon'][$tr[$key]]) OR isset($params['icon']['default'])))
echo '
';
}
/**
* Displays link used to print label format label
*
* @param string $token BackOffice token
* @param int $id Order identifier
*/
private function _displayPrintlabelLink($token, $id)
{
global $currentIndex;
$_cacheLang['printlabel'] = $this->l('Print label format label');
Module::getInstanceByName('dpdpoland');
echo '
';
}
/**
* Main controller (tab) function used to make actions in page
*/
public function postProcess()
{
parent::postProcess();
if (Tools::isSubmit('submitBulkprint_a4order')) {
$module_instance = Module::getInstanceByName('dpdpoland');
if ($errors = $module_instance->printMultipleLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_A4)) {
$this->_errors = $errors;
}
}
if (Tools::isSubmit('submitBulkprint_labelorder')) {
$module_instance = Module::getInstanceByName('dpdpoland');
if ($errors = $module_instance->printMultipleLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL)) {
$this->_errors = $errors;
}
}
if (Tools::isSubmit('printa4formatlabel')) {
$module_instance = Module::getInstanceByName('dpdpoland');
if ($error = $module_instance->printSingleLabel(DpdPolandConfiguration::PRINTOUT_FORMAT_A4)) {
$this->_errors[] = $error;
}
}
if (Tools::isSubmit('printlabelformatlabel')) {
$module_instance = Module::getInstanceByName('dpdpoland');
if ($error = $module_instance->printSingleLabel(DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL)) {
$this->_errors[] = $error;
}
}
}
}