public function install() { if (!$this->preinstall()) { return false; } if (!AgileInstaller::sql_install(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) { return false; } if (parent::install() == false or !$this->setDefaultConfig('ASP_SELLER_NBR', 15) or !$this->setDefaultConfig('ASP_HOME_COLUMN_LEFT', 1) or !$this->setDefaultConfig('ASP_HOME_COLUMN_RIGHT', 0) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_POSITION', 1) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_STYLE', 0) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_VIRTUALSHOP', 0) or !$this->setDefaultConfig('ASP_HEADER_LOGO_MODE', 0) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_POSITION', 1) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_STYLE', 0) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_LEVEL', 'country') or !$this->setDefaultConfig('ASP_SHOP_URL_MODE', AgileMultipleShop::SHOP_URL_MODE_VIRTUAL) or !$this->setDefaultConfig('ASP_SHOP_LOGIN_MODE', AgileMultipleShop::SHOP_LOGIN_MODE_SINGLE) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_LEVEL', 'country') or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_VIRTUALSHOP', 0) or !$this->setDefaultConfig('ASP_URL_CHOICE_CMS', 0) or !$this->setDefaultConfig('ASP_URL_CHOICE_CAT', 0) or $this->registerHook('displayHeader') == false or $this->registerHook('displayLeftColumn') == false or $this->registerHook('displayRightColumn') == false or $this->registerHook('displayHomeTab') == false or $this->registerHook('displayHomeTabContent') == false) { return false; } if (!AgileInstaller::create_tab('Seller Types', 'AgileSellerTypes', 'AdminAdmin', $this->name)) { return false; } AgileInstaller::init_tab_prmission_for_existing_profiles('AgileSellerTypes', 1, 1, 1, 1); $this->create_shops_for_existing_sellers(); if (version_compare(_PS_VERSION_, '1.5', '>=')) { Autoload::getInstance()->generateIndex(); } return true; }
public function getContent() { ${"GLOBALS"}["bqxxxfy"] = "health_check"; ${"GLOBALS"}["qbxopdigit"] = "adminfolder"; global $cookie; $this->_html = "<h2>" . $this->displayName . "</h2>"; ${"GLOBALS"}["kvrvddsl"] = "adminfolder"; ${"GLOBALS"}["opaewiqlpwn"] = "health_check"; ${${"GLOBALS"}["iihtvx"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]); $sdwauu = "health_check"; Configuration::updateValue("AGILE_MS_ADMIN_FOLDER_NAME", ${${"GLOBALS"}["qbxopdigit"]}); ${${"GLOBALS"}["bqxxxfy"]} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["cbfiyrnxuj"]}, $this->name, ${${"GLOBALS"}["kvrvddsl"]}); if (!empty(${${"GLOBALS"}["opaewiqlpwn"]})) { $this->_html .= ${$sdwauu}; } $this->_html .= AgileInstaller::show_agile_links(); if (Tools::isSubmit("submitSetting")) { ${"GLOBALS"}["cjajndwh"] = "seller_back_office"; $kmllpyu = "product_approval"; $kshypr = "seller_approval"; ${$kshypr} = intval(Tools::getValue("seller_approval")); ${"GLOBALS"}["hilfrprkkn"] = "customer_seller"; ${${"GLOBALS"}["hilfrprkkn"]} = intval(Tools::getValue("customer_seller")); ${"GLOBALS"}["pfdkcpmn"] = "payment_mode"; $rwkbxao = "cart_mode"; ${${"GLOBALS"}["fpcptknwjrx"]} = intval(Tools::getValue("edit_category")); ${${"GLOBALS"}["pfdkcpmn"]} = intval(Tools::getValue("payment_mode")); ${"GLOBALS"}["bmpcbkxfkjm"] = "seller_terms"; ${$rwkbxao} = intval(Tools::getValue("cart_mode")); ${${"GLOBALS"}["mxyocfdw"]} = intval(Tools::getValue("seller_tab")); ${${"GLOBALS"}["bmpcbkxfkjm"]} = intval(Tools::getValue("seller_terms")); ${$kmllpyu} = intval(Tools::getValue("product_approval")); ${${"GLOBALS"}["mtuxjshltej"]} = (int) Tools::getValue("seller_panel_withleft"); ${${"GLOBALS"}["hwumogruw"]} = (int) Tools::getValue("\$seller_panel_withright"); ${${"GLOBALS"}["htwdzocv"]} = (int) Tools::getValue("allow_register_athome"); ${${"GLOBALS"}["cjajndwh"]} = (int) Tools::getValue("seller_back_office"); ${${"GLOBALS"}["dwhsqnjp"]} = (int) Tools::getValue("seller_info_theme"); if (${${"GLOBALS"}["dhkpqft"]} == self::PAYMENT_MODE_BOTH and !Module::isInstalled("agilepaypaladaptive") and !Module::isInstalled("agilepaypalparallel") and !Module::isInstalled("cashondelivery")) { $this->_postErrors[] = $this->getL("You must install the Agile Paypal Parallel Payment module if you choose payment mode \"Seller/Store Split Payments\" in the Agile Multiple Seller module."); } if (!sizeof($this->_postErrors)) { ${"GLOBALS"}["dnuvpjgp"] = "seller_approval"; ${"GLOBALS"}["wzwoieecfbc"] = "cart_mode"; $qyfcnee = "seller_tab"; ${"GLOBALS"}["hoewtum"] = "i"; $cryvywov = "customer_seller"; $epimipnhc = "product_approval"; ${"GLOBALS"}["rwldxgt"] = "seller_panel_withleft"; $fhmrijkd = "edit_category"; Configuration::updateValue("AGILE_MS_SELLER_APPROVAL", intval(${${"GLOBALS"}["dnuvpjgp"]})); ${"GLOBALS"}["gcpvlfxyljt"] = "i"; $ujfmgwnic = "seller_info_theme"; Configuration::updateValue("AGILE_MS_CUSTOMER_SELLER", intval(${$cryvywov})); $gizukgx = "i"; $phxtiahxl = "seller_back_office"; $updgitkvtpyr = "product_approval"; Configuration::updateValue("AGILE_MS_EDIT_CATEGORY", intval(${$fhmrijkd})); Configuration::updateValue("AGILE_MS_PAYMENT_MODE", intval(${${"GLOBALS"}["dhkpqft"]})); Configuration::updateValue("AGILE_MS_CART_MODE", intval(${${"GLOBALS"}["wzwoieecfbc"]})); Configuration::updateValue("AGILE_MS_SELLER_TAB", intval(${$qyfcnee})); Configuration::updateValue("AGILE_MS_SELLER_TERMS", intval(${${"GLOBALS"}["wosrajrkxz"]})); Configuration::updateValue("AGILE_MS_PRODUCT_APPROVAL", ${$updgitkvtpyr}); ${"GLOBALS"}["ifcxerun"] = "allow_register_athome"; Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHLEFT", ${${"GLOBALS"}["rwldxgt"]}); Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHRIGHT", ${${"GLOBALS"}["hwumogruw"]}); Configuration::updateValue("AGILE_MS_ALLOW_REGISTER_ATHOME", ${${"GLOBALS"}["ifcxerun"]}); Configuration::updateValue("AGILE_MS_SELLER_BACK_OFFICE", ${$phxtiahxl}); ${"GLOBALS"}["qnjdmsyhtl"] = "i"; Configuration::updateValue("AGILE_MS_SELLER_INFO_THEME", ${$ujfmgwnic}); ${"GLOBALS"}["jboqdlg"] = "i"; for (${${"GLOBALS"}["bimlyp"]} = 1; ${${"GLOBALS"}["bimlyp"]} <= 10; ${${"GLOBALS"}["bimlyp"]}++) { $afmekvfmhej = "field_name"; ${"GLOBALS"}["nheyigjy"] = "i"; ${${"GLOBALS"}["uhwljodynle"]} = sprintf("AGILE_MS_SELLER_TEXT%s", ${${"GLOBALS"}["nheyigjy"]}); $bhjuugriron = "i"; ${${"GLOBALS"}["mbquodqvh"]} = sprintf("ams_custom_text%s", ${$bhjuugriron}); Configuration::updateValue(${${"GLOBALS"}["uhwljodynle"]}, intval(Tools::getValue(${$afmekvfmhej}))); } $gmootmrgt = "i"; for (${${"GLOBALS"}["bimlyp"]} = 1; ${${"GLOBALS"}["bimlyp"]} <= 2; ${$gizukgx}++) { ${"GLOBALS"}["hocpzhqlcq"] = "i"; ${${"GLOBALS"}["uhwljodynle"]} = sprintf("AGILE_MS_SELLER_HTML%s", ${${"GLOBALS"}["bimlyp"]}); $pfkmbpoc = "field_name"; ${${"GLOBALS"}["mbquodqvh"]} = sprintf("ams_custom_html%s", ${${"GLOBALS"}["hocpzhqlcq"]}); Configuration::updateValue(${${"GLOBALS"}["uhwljodynle"]}, intval(Tools::getValue(${$pfkmbpoc}))); } ${"GLOBALS"}["bnsufcienk"] = "i"; for (${${"GLOBALS"}["jboqdlg"]} = 1; ${${"GLOBALS"}["gcpvlfxyljt"]} <= 10; ${${"GLOBALS"}["hoewtum"]}++) { $iutrsdxlhi = "i"; ${"GLOBALS"}["hpdywikc"] = "field_name"; ${${"GLOBALS"}["uhwljodynle"]} = sprintf("AGILE_MS_SELLER_NUMBER%s", ${${"GLOBALS"}["bimlyp"]}); ${${"GLOBALS"}["hpdywikc"]} = sprintf("ams_custom_number%s", ${$iutrsdxlhi}); Configuration::updateValue(${${"GLOBALS"}["uhwljodynle"]}, intval(Tools::getValue(${${"GLOBALS"}["mbquodqvh"]}))); } for (${${"GLOBALS"}["qnjdmsyhtl"]} = 1; ${$gmootmrgt} <= 5; ${${"GLOBALS"}["bnsufcienk"]}++) { ${"GLOBALS"}["wiikfky"] = "key"; $ljmipdsys = "field_name"; ${${"GLOBALS"}["uhwljodynle"]} = sprintf("AGILE_MS_SELLER_DATE%s", ${${"GLOBALS"}["bimlyp"]}); ${${"GLOBALS"}["mbquodqvh"]} = sprintf("ams_custom_date%s", ${${"GLOBALS"}["bimlyp"]}); Configuration::updateValue(${${"GLOBALS"}["wiikfky"]}, intval(Tools::getValue(${$ljmipdsys}))); } if (${$epimipnhc}) { if (!AgileInstaller::create_tab("Bulk Approval", "AgileBulkApproval", "AdminCatalog", $this->name)) { return false; } AgileInstaller::init_tab_prmission_for_existing_profiles("AgileBulkApproval", 1, 1, 1, 1); } else { AgileInstaller::delete_tab("AgileBulkApproval"); } $this->displayConf(); } else { $this->displayErrors(); } } $this->displayForm(); return $this->_html; }
public function install() { if (!defined("_IS_AGILE_DEV_") && !empty(self::${${"GLOBALS"}["wrtttnerkh"]}) && !Tools::getValue("redirected")) { $wgxanwq = "result"; ${${"GLOBALS"}["dctmswpd"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]); AgileInstaller::install_newfiles(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]}, 2); ${$wgxanwq} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]}); if (!empty(${${"GLOBALS"}["usgkpcjvgm"]})) { $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/store/en/content/36-agile-module-installation-tips\">" . $this->l('Failed to update files due to permission issue, please visit here for more instructions.') . "</a>"; return false; } Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1"); } ${${"GLOBALS"}["kmzguepw"]} = AgileInstaller::version_depencies($this->version_dependencies); if (!empty(${${"GLOBALS"}["kmzguepw"]})) { $grvyggbo = "reterrs"; $this->_errors = array_merge($this->_errors, ${$grvyggbo}); return false; } if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) { return false; } AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname1", "varchar(256)", "NULL"); AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname2", "varchar(256)", "NULL"); AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname3", "varchar(256)", "NULL"); AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname1", "varchar(256)", "NULL"); AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname2", "varchar(256)", "NULL"); AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname3", "varchar(256)", "NULL"); ${${"GLOBALS"}["hyjuumq"]} = intval(Configuration::get("AGILE_MS_PROFILE_ID")); if (!AgileInstaller::create_tab("Customer Questions", "AgileSellerMessages", _PS_VERSION_ > "1.5" ? "AdminParentCustomer" : "AdminCustomers", $this->name)) { return false; } AgileInstaller::init_tab_prmission_for_existing_profiles("AgileSellerMessages", 1, 1, 1, 1); if (parent::install() == false or $this->registerHook("displayHeader") == false or !$this->registerHook("displayRightColumnProduct") or $this->registerHook("displayProductTab") == false or $this->registerHook("displayProductTabContent") == false or Configuration::updateValue("ASMGER_LOGIN_REQUIRED", 0) == false or Configuration::updateValue("ASMGER_APPROVAL_REQUIRED", 1) == false or Configuration::updateValue("ASMGER_HIDE_EMAIL", 1) == false or Configuration::updateValue("ASMGER_EMAIL_COPYADMIN", 0) == false or Configuration::updateValue("ASMGER_DONOTREPLY_EMAIL", "") == false or Configuration::updateValue("ASMGER_USE_CAPCHA", 1) == false or Configuration::updateValue("ASMGER_ALLOW_ATTACHMENT", 0) == false) { return false; } if (version_compare(_PS_VERSION_, "1.5", ">=")) { Autoload::getInstance()->generateIndex(); } return true; }
public function install() { if (!$this->preinstall()) { return false; } if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) { return false; } if (parent::install() == false or !$this->setDefaultConfig("ASP_SELLER_NBR", 15) or !$this->setDefaultConfig("ASP_HOME_COLUMN_LEFT", 1) or !$this->setDefaultConfig("ASP_HOME_COLUMN_RIGHT", 0) or !$this->setDefaultConfig("ASP_SELLERS_BLOCK_POSITION", 1) or !$this->setDefaultConfig("ASP_SELLERS_BLOCK_STYLE", 0) or !$this->setDefaultConfig("ASP_SELLERS_BLOCK_VIRTUALSHOP", 0) or !$this->setDefaultConfig("ASP_HEADER_LOGO_MODE", 0) or !$this->setDefaultConfig("ASP_LOCATION_BLOCK_POSITION", 1) or !$this->setDefaultConfig("ASP_LOCATION_BLOCK_STYLE", 0) or !$this->setDefaultConfig("ASP_LOCATION_BLOCK_LEVEL", "country") or !$this->setDefaultConfig("ASP_SHOP_URL_MODE", AgileMultipleShop::SHOP_URL_MODE_VIRTUAL) or !$this->setDefaultConfig("ASP_SHOP_LOGIN_MODE", AgileMultipleShop::SHOP_LOGIN_MODE_SINGLE) or !$this->setDefaultConfig("ASP_LOCATION_BLOCK_LEVEL", "country") or !$this->setDefaultConfig("ASP_LOCATION_BLOCK_VIRTUALSHOP", 0) or !$this->setDefaultConfig("ASP_URL_CHOICE_CMS", 0) or !$this->setDefaultConfig("ASP_URL_CHOICE_CAT", 0) or $this->registerHook("displayHeader") == false or $this->registerHook("displayLeftColumn") == false or $this->registerHook("displayRightColumn") == false or $this->registerHook("displayHomeTab") == false or $this->registerHook("displayHomeTabContent") == false) { return false; } if (!AgileInstaller::create_tab("Seller Types", "AgileSellerTypes", "AdminAdmin", $this->name)) { return false; } AgileInstaller::init_tab_prmission_for_existing_profiles("AgileSellerTypes", 1, 1, 1, 1); $this->create_shops_for_existing_sellers(); if (version_compare(_PS_VERSION_, "1.5", ">=")) { Autoload::getInstance()->generateIndex(); } return true; }