public function postProcess() { if (!$this->redirect_after) { parent::postProcess(); } if ($this->display == 'edit' || $this->display == 'add') { $this->addJqueryUI(array('ui.core', 'ui.widget')); $this->addjQueryPlugin(array('autocomplete', 'tablednd', 'thickbox', 'ajaxfileupload', 'date', 'tagify', 'select2', 'validate')); $this->addJS(array(_PS_JS_DIR_ . 'admin/products.js', _PS_JS_DIR_ . 'admin/attributes.js', _PS_JS_DIR_ . 'admin/price.js', _PS_JS_DIR_ . 'tiny_mce/tiny_mce.js', _PS_JS_DIR_ . 'admin/tinymce.inc.js', _PS_JS_DIR_ . 'admin/dnd.js', _PS_JS_DIR_ . 'jquery/ui/jquery.ui.progressbar.min.js', _PS_JS_DIR_ . 'vendor/spin.js', _PS_JS_DIR_ . 'vendor/ladda.js')); $this->addJS(_PS_JS_DIR_ . 'jquery/plugins/select2/select2_locale_' . $this->context->language->iso_code . '.js'); $this->addJS(_PS_JS_DIR_ . 'jquery/plugins/validate/localization/messages_' . $this->context->language->iso_code . '.js'); $this->addCSS(array(_PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css')); } }
public function postProcess() { if (Module::isInstalled('agilesellerlistoptions') && Tools::getValue('cancellistoptions') && !$this->is_seller) { require_once _PS_ROOT_DIR_ . '/modules/agilesellerlistoptions/agilesellerlistoptions.php'; AgileSellerListOptions::cancelListOptions(Tools::getValue('id_product'), Tools::getValue('cancellistoptions')); $redirecturl = "./index.php?controller=adminproducts&id_product=" . Tools::getValue('id_product') . "&updateproduct&token=" . Tools::getAdminTokenLite("AdminProducts"); Tools::redirectAdmin($redirecturl); } if (Tools::isSubmit('submitBulkassigntoproduct') && !$this->is_seller) { if (isset($_POST[$this->table . 'Box'])) { $productids = $_POST[$this->table . 'Box']; foreach ($productids as $id) { if (intval($id) <= 0) { continue; } AgileSellerManager::assignObjectOwner('product', $id, Tools::getValue("id_seller")); } } else { $this->errors[] = "No product was selected to assign."; } return; } parent::postProcess(); }