public function initContent() { $this->context->smarty->assign(array('agilemultipleseller_isinstalled' => Module::isInstalled('agilemultipleseller') ? 1 : 0, 'agilesellerlistoptions_isinstalled' => Module::isInstalled('agilesellerlistoptions') ? 1 : 0, 'id_first_available_category' => AgileHelper::GetFirstAvailableCategory())); if (Module::isInstalled('agilemultipleseller')) { require_once _PS_ROOT_DIR_ . '/modules/agilemultipleseller/agilemultipleseller.php'; require_once _PS_ROOT_DIR_ . '/modules/agilemultipleseller/SellerInfo.php'; $this->context->smarty->assign(array('agilemultipleseller_hook' => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/views/templates/hook/", 'is_seller' => $this->is_seller, 'id_seller' => AgileSellerManager::getObjectOwnerID($this->table, Tools::getValue('id_' . $this->table)), 'sellers' => $this->is_seller ? null : AgileSellerManager::getSellersNV(true, $this->l('Public in store')), 'approveal_required' => intval(Configuration::get('AGILE_MS_PRODUCT_APPROVAL')), 'approved' => AgileMultipleSeller::is_list_approved(intval(Tools::getValue('id_product'))), 'ajx_category_url' => AgileMultipleSeller::get_agile_ajax_categories_url())); } if (Module::isInstalled('agilesellerlistoptions')) { require_once _PS_ROOT_DIR_ . '/modules/agilesellerlistoptions/agilesellerlistoptions.php'; $aslo_module = new AgileSellerListOptions(); $this->context->smarty->assign(array('agilesellerlistoptions_hook' => _PS_ROOT_DIR_ . "/modules/agilesellerlistoptions/views/templates/hook/", 'HOOK_PRODYCT_LIST_OPTIONS' => $aslo_module->hookAgileAdminProductsFormTop(array('for_front' => 0, 'id_product' => Tools::getValue('id_' . $this->table)), $this->is_seller))); } parent::initContent(); }
public function initContentForAssociations() { $vwvooilwtfmt = "sql"; ${"GLOBALS"}["cgrvkkbvma"] = "root"; ${"GLOBALS"}["lsrhvhqjf"] = "selected_cat"; ${"GLOBALS"}["lknocboq"] = "helper"; ${${"GLOBALS"}["cgrvkkbvma"]} = Category::getRootCategory(); $szksmz = "selected_cat"; $ifaquczty = "category_tree"; ${"GLOBALS"}["ptiwphji"] = "category_tree"; ${"GLOBALS"}["veloultyacp"] = "default_category"; ${$vwvooilwtfmt} = "SELECT id_category_default FROM " . _DB_PREFIX_ . "product WHERE id_product=" . intval($this->object->id); ${${"GLOBALS"}["njpsstddwx"]} = intval(Db::getInstance()->getValue(${${"GLOBALS"}["vvskebgpewm"]})); ${"GLOBALS"}["nqufiynxn"] = "category_tree"; if (!$this->object->id) { ${${"GLOBALS"}["rnirxjg"]} = Category::getCategoryInformations(Tools::getValue("categoryBox", array(${${"GLOBALS"}["veloultyacp"]})), $this->id_language); } else { if (Tools::isSubmit("categoryBox")) { ${${"GLOBALS"}["rnirxjg"]} = Category::getCategoryInformations(Tools::getValue("categoryBox", array(${${"GLOBALS"}["njpsstddwx"]})), $this->id_language); } else { ${${"GLOBALS"}["rnirxjg"]} = Product::getProductCategoriesFull($this->object->id, $this->id_language); } } ${"GLOBALS"}["mwlyyqxnvr"] = "selected_cat"; if (!array_key_exists(${${"GLOBALS"}["njpsstddwx"]}, ${$szksmz})) { ${"GLOBALS"}["veixrgsr"] = "default_category"; ${"GLOBALS"}["rjxpfcwol"] = "sql"; $epyobpqsn = "selected_cat"; ${${"GLOBALS"}["rjxpfcwol"]} = "SELECT id_category, name, link_rewrite, id_lang FROM " . _DB_PREFIX_ . "category_lang WHERE id_category=" . ${${"GLOBALS"}["veixrgsr"]} . " AND id_lang=" . intval($this->id_language); $tvjsbnwmt = "default_category"; ${$epyobpqsn}[${$tvjsbnwmt}] = Db::getInstance()->getRow(${${"GLOBALS"}["vvskebgpewm"]}); } self::$smarty->assign("feature_shop_active", Shop::isFeatureActive()); ${${"GLOBALS"}["vppwhfouit"]} = new HelperForm(); if ($this->object && $this->object->id) { $helper->id = $this->object->id; } else { $helper->id = null; } $helper->table = "product"; $helper->identifier = "id_product"; self::$smarty->assign("displayAssoShop", $helper->renderAssoShop()); ${${"GLOBALS"}["doeaqcaombq"]} = Product::getAccessoriesLight($this->id_language, $this->object->id); if (${${"GLOBALS"}["yfkrfqnu"]} = Tools::getValue("inputAccessories")) { ${${"GLOBALS"}["qmhlnpccscr"]} = explode("-", Tools::getValue("inputAccessories")); foreach (${${"GLOBALS"}["qmhlnpccscr"]} as ${${"GLOBALS"}["vertwbyora"]}) { $uypybcj = "accessory"; ${"GLOBALS"}["wuwogouethxi"] = "accessory_id"; ${"GLOBALS"}["mkrmryb"] = "accessory"; $rukqokdbuw = "accessories"; if (!$this->haveThisAccessory(${${"GLOBALS"}["wuwogouethxi"]}, ${${"GLOBALS"}["doeaqcaombq"]}) && (${${"GLOBALS"}["mkrmryb"]} = Product::getAccessoryById(${${"GLOBALS"}["vertwbyora"]}))) { ${$rukqokdbuw}[] = ${$uypybcj}; } } } self::$smarty->assign("accessories", ${${"GLOBALS"}["doeaqcaombq"]}); ${${"GLOBALS"}["vbwuxas"]} = array("id_category" => $root->id, "name" => $root->name); ${${"GLOBALS"}["lknocboq"]} = new Helper(); ${${"GLOBALS"}["bfswydsx"]} = AgileMultipleSeller::getSpecialCatrgoryIdsArray(); ${${"GLOBALS"}["nqufiynxn"]} = $helper->renderCategoryTree(${${"GLOBALS"}["vbwuxas"]}, ${${"GLOBALS"}["mwlyyqxnvr"]}, "categoryBox", false, true, ${${"GLOBALS"}["bfswydsx"]}); ${${"GLOBALS"}["ptiwphji"]} = ${${"GLOBALS"}["dwiitcql"]} . "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\$(document).ready(function(){\n\t\t\t\tbuildTreeView();\n\t\t\t});</script>\n\t\t\t"; self::$smarty->assign(array("default_category" => ${${"GLOBALS"}["njpsstddwx"]}, "selected_cat_ids" => implode(",", array_keys(${${"GLOBALS"}["lsrhvhqjf"]})), "selected_cat" => ${${"GLOBALS"}["rnirxjg"]}, "id_category_default" => $this->object->getDefaultCategory(), "category_tree" => ${$ifaquczty}, "product" => $this->object, "agile_ms_edit_category" => Configuration::get("AGILE_MS_EDIT_CATEGORY"), "link" => $this->context->link, "id_first_available_category" => AgileHelper::GetFirstAvailableCategory(), "ajx_category_url" => AgileMultipleSeller::get_agile_ajax_categories_url())); }