Esempio n. 1
0
 public function preinstall()
 {
     $yqqodbjgeg = "reterrs";
     if (!defined("_IS_AGILE_DEV_") && !empty($this->newfiles) && !Tools::getValue("redirected")) {
         ${"GLOBALS"}["knqfecnkgdoh"] = "result";
         ${"GLOBALS"}["glhcybl"] = "adminfolder";
         ${${"GLOBALS"}["dnbuadvi"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles($this->newfiles, $this->name, ${${"GLOBALS"}["glhcybl"]}, 2);
         ${${"GLOBALS"}["hhfazbwhkgg"]} = AgileInstaller::install_health_check($this->newfiles, $this->name, ${${"GLOBALS"}["dnbuadvi"]});
         if (!empty(${${"GLOBALS"}["knqfecnkgdoh"]})) {
             $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");
     }
     AgileInstaller::process_shared_override($this->name, $this->shared_override);
     ${"GLOBALS"}["ayjsfp"] = "reterrs";
     ${$yqqodbjgeg} = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty(${${"GLOBALS"}["xrjtzzbelbld"]})) {
         $this->_errors = array_merge($this->_errors, ${${"GLOBALS"}["xrjtzzbelbld"]});
         return false;
     }
     ${${"GLOBALS"}["xrjtzzbelbld"]} = AgileInstaller::CanModuleOverride($this->name);
     if (!empty(${${"GLOBALS"}["ayjsfp"]})) {
         $ovvrqmk = "reterrs";
         $this->_errors = array_merge($this->_errors, ${$ovvrqmk});
         return false;
     }
     return true;
 }
Esempio n. 2
0
 public function preinstall()
 {
     ${"GLOBALS"}["gbpsbjss"] = "reterrs";
     ${"GLOBALS"}["cqivbxpwvu"] = "reterrs";
     if (!defined("_IS_AGILE_DEV_") && !empty($this->newfiles) && !Tools::getValue("redirected")) {
         ${"GLOBALS"}["pbgqplgdhn"] = "adminfolder";
         ${${"GLOBALS"}["pbgqplgdhn"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles($this->newfiles, $this->name, ${${"GLOBALS"}["uyaelzfgq"]}, 2);
         ${${"GLOBALS"}["utfubvv"]} = AgileInstaller::install_health_check($this->newfiles, $this->name, ${${"GLOBALS"}["uyaelzfgq"]});
         if (!empty(${${"GLOBALS"}["utfubvv"]})) {
             $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");
     }
     AgileInstaller::process_shared_override($this->name, $this->shared_override);
     ${${"GLOBALS"}["cqivbxpwvu"]} = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty(${${"GLOBALS"}["kdimirig"]})) {
         ${"GLOBALS"}["obtmsybtt"] = "reterrs";
         $this->_errors = array_merge($this->_errors, ${${"GLOBALS"}["obtmsybtt"]});
         return false;
     }
     ${${"GLOBALS"}["gbpsbjss"]} = AgileInstaller::CanModuleOverride($this->name);
     if (!empty(${${"GLOBALS"}["kdimirig"]})) {
         $this->_errors = array_merge($this->_errors, ${${"GLOBALS"}["kdimirig"]});
         return false;
     }
     return true;
 }
 public function install()
 {
     if (!defined('_IS_AGILE_DEV_') && !empty(self::$_newfiles) && !Tools::getValue("redirected")) {
         $adminfolder = AgileInstaller::detect_admin_folder($_SERVER['SCRIPT_FILENAME']);
         AgileInstaller::install_newfiles(self::$_newfiles, $this->name, $adminfolder, 2);
         $result = AgileInstaller::install_health_check(self::$_newfiles, $this->name, $adminfolder);
         if (!empty($result)) {
             $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->getL('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");
     }
     $reterrs = AgileInstaller::CanModuleOverride($this->name);
     if (!empty($reterrs)) {
         $this->_errors = array_merge($this->_errors, $reterrs);
         return false;
     }
     $reterrs = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty($reterrs)) {
         $this->_errors = array_merge($this->_errors, $reterrs);
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
         return false;
     }
     if (!parent::install() or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS', '*****@*****.**') or !Configuration::updateValue('AGILE_PAYPAL_SANDBOX', 1) or !Configuration::updateValue('AGILE_PAYPAL_FORCE_SUMMARY', '1') or !Configuration::updateValue('AGILE_PAYPAL_HIDE_COUNTRY', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_CARRIER', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_TERMS', 0) or !Configuration::updateValue('AGILE_PAYPAL_HEADER', '') or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_PAYMENT', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_DAILY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_WEEKLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_MONTHLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_YEARLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUPPORT_SELLERS', 0) or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS2', '') or !Configuration::updateValue('AGILE_PAYPAL_MICRO_AMOUNT', 0) or !Configuration::updateValue('AGILE_PAYPAL_EXPRESS_ENABLED', 1) or !Configuration::updateValue('AGILE_PAYPAL_AM_INTEGRATED', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_SHOW_CHOICE', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_NO_MIX_PRODUCT', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUBSCRIBE_ONLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_CURRENCY', Configuration::get('PS_CURRENCY_DEFAULT')) or !$this->registerHook('agileexpresscheckout') or !$this->registerHook('displayShoppingCartFooter') or !$this->registerHook('displayProductButtons') or !$this->registerHook('displayPayment') or !$this->registerHook('displayPaymentReturn') or !$this->registerHook('displayFooter')) {
         return false;
     }
     if (version_compare(_PS_VERSION_, '1.5', '>=')) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }
Esempio n. 4
0
 function install()
 {
     $jfwdvmlh = "reterrs";
     $rcfsdwxkrfr = "reterrs";
     $picorcbvbjw = "pid";
     @set_time_limit(120);
     ${"GLOBALS"}["dbmmuxigchv"] = "reterrs";
     if (!$this->check16013()) {
         $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/forum/viewtopic.php?f=10&t=2181&p=7622\">" . $this->l('You are using PrestaShop 1.6.0.12/13/14, you need to fix 2 fatal bugs of PrestaShop first before installing this module. Please visit here for more instructions.') . "</a>";
         return false;
     }
     if (!defined("_IS_AGILE_DEV_") && !empty(self::${${"GLOBALS"}["cutdtieh"]}) && !Tools::getValue("redirected")) {
         ${"GLOBALS"}["cedfefuylho"] = "adminfolder";
         ${"GLOBALS"}["qqwmbcglxk"] = "adminfolder";
         $lfrqohzbyihy = "result";
         $kehebpyykf = "result";
         ${${"GLOBALS"}["cedfefuylho"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles(self::${${"GLOBALS"}["cutdtieh"]}, $this->name, ${${"GLOBALS"}["lnqnkx"]}, 2);
         ${$lfrqohzbyihy} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["cutdtieh"]}, $this->name, ${${"GLOBALS"}["qqwmbcglxk"]});
         if (!empty(${$kehebpyykf})) {
             $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"}["dbmmuxigchv"]} = AgileInstaller::version_depencies($this->version_dependencies);
     ${"GLOBALS"}["gkvxrpe"] = "pid";
     if (!empty(${$jfwdvmlh})) {
         $this->_errors = array_merge($this->_errors, ${${"GLOBALS"}["dnccsutmou"]});
         return false;
     }
     ${$rcfsdwxkrfr} = AgileInstaller::CanModuleOverride($this->name);
     if (!empty(${${"GLOBALS"}["dnccsutmou"]})) {
         $qxvkqwflpkt = "reterrs";
         $this->_errors = array_merge($this->_errors, ${$qxvkqwflpkt});
         return false;
     }
     ${"GLOBALS"}["wjqppbgec"] = "pid";
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) {
         return false;
     }
     $this->add_fields_for_upgrade();
     $this->build_index();
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::FIELDS_CONFIG_SQL_FILE)) {
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::CUSTOM_FIELDS_CONFIG_SQL_FILE)) {
         return false;
     }
     if (!$this->register_tabs()) {
         return false;
     }
     ${${"GLOBALS"}["wjqppbgec"]} = $this->createLinkedProfile();
     AgileInstaller::init_profile_prmission_for_existing_tabs(${${"GLOBALS"}["gkvxrpe"]}, 0, 0, 0, 0);
     $this->set_permissions(${${"GLOBALS"}["mpdtemgjjhqp"]}, self::${${"GLOBALS"}["evyxjfphfrmf"]});
     if (parent::install() == false or Configuration::updateValue("AGILE_MS_PROFILE_ID", ${$picorcbvbjw}) == false or Configuration::updateValue("AGILE_MS_CUSTOMER_SELLER", 1) == false or Configuration::updateValue("AGILE_MS_SELLER_APPROVAL", 0) == false or Configuration::updateValue("AGILE_MS_EDIT_CATEGORY", 0) == false or Configuration::updateValue("AGILE_MS_PAYMENT_MODE", AgileMultipleSeller::PAYMENT_MODE_STORE) == false or Configuration::updateValue("AGILE_MS_CART_MODE", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_TAB", 1) == false or Configuration::updateValue("AGILE_MS_SELLER_TERMS", 3) == false or Configuration::updateValue("AGILE_MS_PRODUCT_APPROVAL", 0) == false or Configuration::updateValue("AGILE_MS_MYSELLER_URL_DIRECTORY", "my-seller-account") == false or Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHLEFT", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHRIGHT", 0) == false or Configuration::updateValue("AGILE_MS_ALLOW_REGISTER_ATHOME", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_BACK_OFFICE", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_INFO_THEME", 0) == false) {
         return false;
     }
     if (!$this->registerHook("displayFooter") or !$this->registerHook("actionCartSave") or !$this->registerHook("displayCustomerAccountForm") or !$this->registerHook("actionValidateOrder") or !$this->registerHook("displayProductTab") or !$this->registerHook("displayProductTabContent") or !$this->registerHook("actionOrderStatusUpdate") or !$this->registerHook("actionHtaccessCreate") or !$this->registerHook("actionCustomerAccountAdd") or !$this->registerHook("actionCarrierUpdate") or !$this->registerHook("displayHeader")) {
         return false;
     }
     $this->update_sellerinfo_lang_data();
     $this->registerHook("customerAccount");
     $this->registerHook("myAccountBlock");
     $this->hookActionHtaccessCreate(array("install" => 1));
     Configuration::updateValue("AGILE_MS_ADMIN_FOLDER_NAME", AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]));
     $this->assign_exosting_objects();
     $this->install_otherfiles();
     if (version_compare(_PS_VERSION_, "1.5", ">=")) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }