secure_key || !Tools::getValue('action')) // die(1); if (Tools::getValue('action') == 'LoadAllTabs') { echo $thismodule->returnListOfTabs(); } if (Tools::getValue('action') == 'updateSlidesPosition') { $extratabs = Tools::getValue('productextratab'); foreach ($extratabs as $position => $id_tab) { $res = Db::getInstance()->execute(' UPDATE `' . _DB_PREFIX_ . 'extratabspro` SET `position` = ' . (int)$position . ' WHERE `id_tab` = ' . (int)$id_tab . ''); } $thismodule->cccc('*'); } if (Tools::getValue('search_feature','false') != 'false') { $result = $thismodule->searchfeature(Tools::getValue('search_feature')); if (count($result) > 0) { foreach ($result as $key => $value) { echo '
'.$value['name'].' '.$thismodule->addcategory.'
'; } } else { echo $thismodule->noproductsfound; } } if (Tools::getValue('action') == 'removeTab' && Tools::getValue('id_tab')) { $extratab = new Extratabpro(Tools::getValue('id_tab')); $extratab->delete(); $thismodule->cccc('*'); } if (isset($_POST['search_supplier'])) { $result = $thismodule->searchsupplier(Tools::getValue('search_supplier')); if (count($result) > 0) { foreach ($result as $key => $value) { echo '' . $value['name'] . '' . $thismodule->addcategory . '
'; } } else { echo $thismodule->nosuppliersfound; } } if (Tools::getValue('action') == 'unhookTab' && Tools::getValue('id_tab') && Tools::getValue('id_product')) { $extratab = new extratabpro(Tools::getValue('id_tab')); $explode = explode(",", $extratab->products); $array_products = array(); foreach ($explode as $product) { if ($product != Tools::getValue('id_product')) { $array_products[] = $product; } } $array_products_to_db = ''; foreach ($array_products as $product) { $array_products_to_db = $array_products_to_db . $product . ","; } $extratab->products = $array_products_to_db; $extratab->update(); $thismodule->cccc('*'); } if (Tools::getValue('action') == 'AddTabToProduct' && Tools::getValue('id_tab') && Tools::getValue('id_product')) { $items = ''; $id_tab = str_replace('productExtratab_', '', Tools::getValue('id_tab')); $product_extratab = new Extratabpro($id_tab); $product_extratab->block_type3 = 1; $products = $product_extratab->products; $array = explode(",", $products); $array[] = Tools::getValue('id_product'); foreach ($array as $ar => $item) { if ($item != "") { $items .= $item . ","; } } $items = trim($items); $product_extratab->products = $items; $product_extratab->update(); $employee_idlang = Context::getContext()->language->id; echo '$("#productextratab").append(\'' . $value['name'] . '' . $thismodule->addcategory . '
'; } } else { echo $thismodule->nocategoriesfound; } } if (isset ($_POST['search_product'])) { $result = $thismodule->searchproduct(Tools::getValue('search_product')); if (count($result) > 0) { foreach ($result as $key => $value) { echo '' . $value['name'] . '' . $thismodule->addcategory . '
'; } } else { echo $thismodule->noproductsfound; } } if (isset ($_POST['search_manufacturer'])) { $result = $thismodule->searchmanufacturer(Tools::getValue('search_manufacturer')); if (count($result) > 0) { foreach ($result as $key => $value) { echo '' . $value['name'] . '' . $thismodule->addcategory . '
'; } } else { echo $thismodule->nomanufacturersfound; } }