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;
 }
예제 #2
0
 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;
 }
예제 #3
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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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;
 }