name)) exit; if (Tools::isSubmit('save_pudo_id')) { echo $module_instance->savePudoMapCode(); exit; } if (Tools::isSubmit('getFormattedAddressHTML')) { $id_address = (int)Tools::getValue('id_address'); echo $module_instance->getFormattedAddressHTML($id_address); exit; } if (Tools::isSubmit('getFormattedSenderAddressHTML')) { $id_address = (int)Tools::getValue('id_address'); echo $module_instance->getFormattedSenderAddressHTML($id_address); exit; } if (Tools::isSubmit('getProducts')) { echo Tools::jsonEncode($module_instance->searchProducts(Tools::getValue('q'))); exit; } if (Tools::isSubmit('savePackagePrintLabels')) { if (!$id_package_ws = $module_instance->savePackageFromPost()) { die(Tools::jsonEncode(array( 'error' => reset(DpdPoland::$errors) ))); } $printout_format = Tools::getValue('dpdpoland_printout_format'); if ($printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL && $printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_A4) $printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL; die(Tools::jsonEncode(array( 'error' => false, 'id_package_ws' => (int)$id_package_ws, 'link_to_labels_pdf' => '?printLabels&id_package_ws='.(int)$id_package_ws.'&printout_format='.$printout_format.'&token='.Tools::getValue('token') ))); } if (Tools::isSubmit('printLabels')) { $printout_format = Tools::getValue('dpdpoland_printout_format'); if ($printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL && $printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_A4) $printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL; die(Tools::jsonEncode(array( 'error' => false, 'link_to_labels_pdf' => '?printLabels&id_package_ws='.(int)Tools::getValue('id_package_ws'). '&printout_format='.$printout_format.'&token='.Tools::getValue('token') ))); } if (Tools::getValue('addDPDClientNumber')) { $result = $module_instance->addDPDClientNumber(); die(Tools::jsonEncode($result)); } if (Tools::getValue('deleteDPDClientNumber')) { $result = $module_instance->deleteDPDClientNumber(); die(Tools::jsonEncode($result)); } if (Tools::getValue('getPayerNumbersTableHTML')) { $html = $module_instance->getPayerNumbersTableHTML(); die(Tools::jsonEncode($html)); } if (Tools::getValue('calculateTimeLeft')) { $time_left = $module_instance->calculateTimeLeft(); die(Tools::jsonEncode($time_left)); } if (Tools::getValue('getTimeFrames')) { $html = $module_instance->getTimeFrames(); die(Tools::jsonEncode($html)); }