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;
 }
Beispiel #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;
 }