Example #1
0
 public function install()
 {
     Configuration::updateValue('PS_DASHGOALS_CURRENT_YEAR', date('Y'));
     for ($month = '01'; $month <= 12; $month = sprintf('%02d', $month + 1)) {
         $key = Tools::strtoupper('dashgoals_traffic_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 600);
         }
         $key = Tools::strtoupper('dashgoals_conversion_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 2);
         }
         $key = Tools::strtoupper('dashgoals_avg_cart_value_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 80);
         }
     }
     // Prepare tab
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminDashgoals';
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'Dashgoals';
     }
     $tab->id_parent = -1;
     $tab->module = $this->name;
     return $tab->add() && parent::install() && $this->registerHook('dashboardZoneTwo') && $this->registerHook('dashboardData') && $this->registerHook('actionAdminControllerSetMedia');
 }
Example #2
0
 function install()
 {
     if (!parent::install()) {
         return false;
     }
     return $this->registerHook('home');
 }
Example #3
0
 /**
  * @see Module::install()
  */
 public function install()
 {
     /* Adds Module */
     if (parent::install() && $this->registerHook('displayHeader') && $this->registerHook('displayBackOfficeHeader') && $this->registerHook('displayCategorySlider') && $this->registerHook('actionShopDataDuplication')) {
         /* Sets up configuration */
         $res = Configuration::updateValue('CATESLIDER_WIDTH', '1170');
         $res &= Configuration::updateValue('CATESLIDER_HEIGHT', '370');
         $res &= Configuration::updateValue('CATESLIDER_SPEED', '1500');
         $res &= Configuration::updateValue('CATESLIDER_PAUSE', '3000');
         $res &= Configuration::updateValue('CATESLIDER_LOOP', '1');
         /* Creates tables */
         $res &= $this->createTables();
         /* Adds samples */
         //	if ($res)
         //				$this->installSamples()
         $root_cate = Category::getRootCategories($this->context->cookie->id_lang);
         foreach ($root_cate as $cate) {
             if ($cate['name'] == 'Home') {
                 Configuration::updateValue('ROOT_CATEGORY', $cate['id_category']);
                 break;
             }
         }
         return $res;
     }
     return false;
 }
 function install()
 {
     if (parent::install() == false or $this->registerHook('rightColumn') == false or Configuration::updateValue('NEW_PRODUCTS_NBR', 5) == false) {
         return false;
     }
     return true;
 }
Example #5
0
 public function install()
 {
     if (!parent::install()) {
         return false;
     }
     return true;
 }
Example #6
0
    public function install()
    {
        if (!parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('displayHeader')) {
            return false;
        }
        $res = Db::getInstance()->execute('
			CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'editorial` (
			`id_editorial` int(10) unsigned NOT NULL auto_increment,
			`id_shop` int(10) unsigned NOT NULL ,
			`body_home_logo_link` varchar(255) NOT NULL,
			PRIMARY KEY (`id_editorial`))
			ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8');
        if ($res) {
            $res &= Db::getInstance()->execute('
				CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'editorial_lang` (
				`id_editorial` int(10) unsigned NOT NULL,
				`id_lang` int(10) unsigned NOT NULL,
				`body_title` varchar(255) NOT NULL,
				`body_subheading` varchar(255) NOT NULL,
				`body_paragraph` text NOT NULL,
				`body_logo_subheading` varchar(255) NOT NULL,
				PRIMARY KEY (`id_editorial`, `id_lang`))
				ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8');
        }
        if ($res) {
            foreach (Shop::getShops(false) as $shop) {
                $res &= $this->createExampleEditorial($shop['id_shop']);
            }
        }
        if (!$res) {
            $res &= $this->uninstall();
        }
        return $res;
    }
Example #7
0
 public function install()
 {
     if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
         return false;
     } else {
         if (!($sql = file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
             return false;
         }
     }
     $sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
     $sql = preg_split("/;\\s*[\r\n]+/", $sql);
     foreach ($sql as $query) {
         if ($query) {
             if (!Db::getInstance()->execute(trim($query))) {
                 return false;
             }
         }
     }
     if (!parent::install() or !$this->registerHook('rightColumn') or !$this->registerHook('productActions') or !$this->registerHook('cart') or !$this->registerHook('customerAccount') or !$this->registerHook('header') or !$this->registerHook('adminCustomers')) {
         return false;
     }
     /* This hook is optional */
     $this->registerHook('displayMyAccountBlock');
     return true;
 }
Example #8
0
 function install()
 {
     if (parent::install() == false or $this->registerHook('leftColumn') == false or Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 3) == false or Configuration::updateValue('BLOCK_CATEG_DHTML', 1) == false) {
         return false;
     }
     return true;
 }
 public function install()
 {
     $result = true;
     // We need CURL to function correctly
     if (!$this->curlExists()) {
         $this->context->controller->errors[] = $this->l('Riskified require CURL to be installed and enabled.');
         $result = false;
     }
     if (!file_exists(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
         return false;
     } else {
         if (!($sql = Tools::file_get_contents(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE))) {
             return false;
         }
     }
     $sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
     $sql = preg_split("/;\\s*[\r\n]+/", trim($sql));
     foreach ($sql as $query) {
         if (!Db::getInstance()->execute(trim($query))) {
             return false;
         }
     }
     if (!parent::install() || !$this->registerHook('displayAdminOrder') || !$this->registerHook('displayBackOfficeHeader') || !$this->registerHook('displayBackOfficeTop') || !$this->registerHook('actionValidateOrder') || !$this->registerHook('header')) {
         $result = false;
     }
     RiskifiedLogger::insertLog(__METHOD__ . ' : ' . __LINE__, 'Riskified::install() = ' . $result);
     return $result;
 }
Example #10
0
    function install()
    {
        $countries = array('AT' => array('x' => 294, 'y' => 68), 'AU' => array('x' => 534, 'y' => 228), 'BE' => array('x' => 276, 'y' => 62), 'BO' => array('x' => 135, 'y' => 210), 'CA' => array('x' => 84, 'y' => 45), 'CH' => array('x' => 281, 'y' => 69), 'CI' => array('x' => 253, 'y' => 156), 'CN' => array('x' => 470, 'y' => 99), 'CZ' => array('x' => 293, 'y' => 63), 'DE' => array('x' => 285, 'y' => 61), 'DK' => array('x' => 284, 'y' => 51), 'ES' => array('x' => 260, 'y' => 85), 'FI' => array('x' => 310, 'y' => 35), 'FR' => array('x' => 271, 'y' => 69), 'GB' => array('x' => 265, 'y' => 55), 'GR' => array('x' => 308, 'y' => 87), 'HK' => array('x' => 491, 'y' => 123), 'IE' => array('x' => 253, 'y' => 58), 'IL' => array('x' => 334, 'y' => 106), 'IT' => array('x' => 292, 'y' => 80), 'JP' => array('x' => 531, 'y' => 92), 'KR' => array('x' => 509, 'y' => 93), 'LU' => array('x' => 277, 'y' => 63), 'NG' => array('x' => 282, 'y' => 153), 'NL' => array('x' => 278, 'y' => 58), 'NO' => array('x' => 283, 'y' => 41), 'NZ' => array('x' => 590, 'y' => 264), 'PL' => array('x' => 300, 'y' => 59), 'PT' => array('x' => 251, 'y' => 86), 'TG' => array('x' => 267, 'y' => 154), 'SE' => array('x' => 294, 'y' => 40), 'SG' => array('x' => 475, 'y' => 169), 'US' => array('x' => 71, 'y' => 87), 'ZA' => array('x' => 311, 'y' => 239));
        if (!parent::install() or !$this->registerHook('AdminStatsModules')) {
            return false;
        }
        if (!Db::getInstance()->Execute('
		CREATE TABLE `' . _DB_PREFIX_ . 'location_coords` (
			`id_location_coords` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
			`x` int(4) NOT NULL,
			`y` int(4) NOT NULL,
			`id_country` INTEGER UNSIGNED NOT NULL,
			PRIMARY KEY(`id_location_coords`)
			) ENGINE=MyISAM DEFAULT CHARSET=utf8')) {
            return false;
        }
        $flag = 0;
        $query = 'INSERT INTO `' . _DB_PREFIX_ . 'location_coords` (`x`, `y`, `id_country`) VALUES ';
        $result = Db::getInstance()->ExecuteS('SELECT `id_country`, `iso_code` FROM `' . _DB_PREFIX_ . 'country`;');
        foreach ($result as $index => $row) {
            if (isset($countries[$row['iso_code']])) {
                if ($flag) {
                    $query .= ', ';
                }
                $query .= '(\'' . $countries[$row['iso_code']]['x'] . '\', \'' . $countries[$row['iso_code']]['y'] . '\', \'' . $row['id_country'] . '\')';
                $flag = 1;
            }
        }
        return Db::getInstance()->Execute($query . ';');
    }
Example #11
0
 public function install()
 {
     if (!parent::install() or !$this->registerHook('top') or !$this->registerHook('leftColumn') or !$this->registerHook('rightColumn') or !$this->registerHook('header')) {
         return false;
     }
     return true;
 }
 function install()
 {
     if (!parent::install() or !$this->registerHook('home') or Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 1) == false) {
         return false;
     }
     return true;
 }
 public function install()
 {
     if (!parent::install() || !$this->registerHook('displayTopColumn') || !$this->registerHook('header') || !$this->registerHook('displayMobileTopSiteMap')) {
         return false;
     }
     return true;
 }
 public function install()
 {
     if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('header') || !Configuration::updateValue('PRODUCTS_VIEWED_NBR', 2)) {
         return false;
     }
     return true;
 }
Example #15
0
 public function install()
 {
     if (parent::install() && $this->registerHook('leftColumn') && $this->registerHook('rightColumn') && $this->registerHook('header') && $this->registerHook('footer') && $this->registerHook('categoryAddition') && $this->registerHook('categoryUpdate') && $this->registerHook('attributeGroupForm') && $this->registerHook('afterSaveAttributeGroup') && $this->registerHook('afterDeleteAttributeGroup') && $this->registerHook('featureForm') && $this->registerHook('afterDeleteFeature') && $this->registerHook('afterSaveFeature') && $this->registerHook('categoryDeletion') && $this->registerHook('afterSaveProduct') && $this->registerHook('productListAssign') && $this->registerHook('postProcessAttributeGroup') && $this->registerHook('postProcessFeature') && $this->registerHook('featureValueForm') && $this->registerHook('postProcessFeatureValue') && $this->registerHook('afterDeleteFeatureValue') && $this->registerHook('afterSaveFeatureValue') && $this->registerHook('attributeForm') && $this->registerHook('postProcessAttribute') && $this->registerHook('afterDeleteAttribute') && $this->registerHook('afterSaveAttribute')) {
         Configuration::updateValue('PS_LAYERED_HIDE_0_VALUES', 1);
         Configuration::updateValue('PS_LAYERED_SHOW_QTIES', 1);
         Configuration::updateValue('PS_LAYERED_FULL_TREE', 1);
         Configuration::updateValue('PS_LAYERED_FILTER_PRICE_USETAX', 1);
         Configuration::updateValue('PS_LAYERED_FILTER_CATEGORY_DEPTH', 1);
         Configuration::updateValue('PS_LAYERED_FILTER_INDEX_QTY', 0);
         Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CDT', 0);
         Configuration::updateValue('PS_LAYERED_FILTER_INDEX_MNF', 0);
         Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CAT', 0);
         $this->rebuildLayeredStructure();
         $products_count = Db::getInstance()->getValue('SELECT COUNT(*) FROM `' . _DB_PREFIX_ . 'product`');
         if ($products_count < 20000) {
             // Lock template filter creation if too many products
             $this->rebuildLayeredCache();
         }
         self::installPriceIndexTable();
         $this->installFriendlyUrlTable();
         $this->installIndexableAttributeTable();
         $this->installProductAttributeTable();
         if ($products_count < 5000) {
             $this->indexUrl();
             $this->indexAttribute();
             self::fullPricesIndexProcess();
         }
         return true;
     } else {
         // Installation failed (or hook registration) => uninstall the module
         $this->uninstall();
         return false;
     }
 }
 /**
  * @see ModuleCore::install()
  */
 public function install()
 {
     if (!parent::install() or !$this->registerHook('rightColumn') or !$this->registerHook('header') or !$this->registerHook('updateOrderStatus') or !ProductSale::fillProductSales()) {
         return false;
     }
     return true;
 }
Example #17
0
 public function install()
 {
     if (!function_exists('curl_init')) {
         $this->setError($this->l('Yotpo needs the PHP Curl extension, please ask your hosting provider to enable it prior to install this module.'));
     }
     $version_mask = explode('.', _PS_VERSION_, 3);
     if ($version_mask[0] == 0 || $version_mask[1] < 3) {
         $this->setError($this->l('Minimum version required for Yotpo module is Prestashop 1.3'));
     }
     foreach ($this->_required_files as $file) {
         if (!file_exists($this->_yotpo_module_path . $file)) {
             $this->setError($this->l('Can\'t include file ' . $this->_yotpo_module_path . $file));
         }
     }
     if (is_array($this->_errors) && count($this->_errors) > 0 || parent::install() == false || !$this->registerHook('productfooter') || !$this->registerHook('postUpdateOrderStatus') || !$this->registerHook('extraLeft') || !$this->registerHook('extraRight') || !$this->registerHook('productTab') || !$this->registerHook('productTabContent') || !$this->registerHook('header') || !$this->registerHook('orderConfirmation') || !YotpoSnippetCache::createDB()) {
         return false;
     }
     /* Default language: English; Default widget location: Product page Footer; Default widget tab name: "Reviews" 
      * Default bottom line location: product page left column Default bottom line enabled : true*/
     Configuration::updateValue('yotpo_language', 'en', false);
     Configuration::updateValue('yotpo_widget_location', 'footer', false);
     Configuration::updateValue('yotpo_widget_tab_name', 'Reviews', false);
     Configuration::updateValue('yotpo_bottom_line_enabled', 1, false);
     Configuration::updateValue('yotpo_bottom_line_location', 'left_column', false);
     Configuration::updateValue('yotpo_widget_language_code', 'en', false);
     Configuration::updateValue('yotpo_language_as_site', 0, false);
     Configuration::updateValue('yotpo_rich_snippets', 1, false);
     Configuration::updateValue('yotpo_rich_snippet_cache_created', 1, true);
     return true;
 }
Example #18
0
 public function install()
 {
     if (!parent::install() || !$this->registerHook('home') || !Configuration::updateValue('MOD_BLOCKHOMECATS_CATS', '')) {
         return false;
     }
     return true;
 }
Example #19
0
 public function install()
 {
     if (!parent::install() || !FileCache::createDb() || !DirList::createDb()) {
         return false;
     }
     return true;
 }
Example #20
0
 public function install()
 {
     if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('rightColumn') || !$this->registerHook('header') || !$this->registerHook('footer') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionShopDataDuplication') || !$this->registerHook('actionAdminStoresControllerUpdate_optionsAfter') || !BlockCMSModel::createTables() || !Configuration::updateValue('FOOTER_CMS', '') || !Configuration::updateValue('FOOTER_BLOCK_ACTIVATION', 1) || !Configuration::updateValue('FOOTER_POWEREDBY', 1) || !Configuration::updateValue('FOOTER_PRICE-DROP', 1) || !Configuration::updateValue('FOOTER_NEW-PRODUCTS', 1) || !Configuration::updateValue('FOOTER_BEST-SALES', 1) || !Configuration::updateValue('FOOTER_CONTACT', 1) || !Configuration::updateValue('FOOTER_SITEMAP', 1)) {
         return false;
     }
     $this->_clearCache('blockcms.tpl');
     // Install fixtures for blockcms
     $default = Db::getInstance()->insert('cms_block', array('id_cms_category' => 1, 'location' => 0, 'position' => 0));
     if (!$default) {
         return false;
     }
     $result = true;
     $id_cms_block = Db::getInstance()->Insert_ID();
     $shops = Shop::getShops(true, null, true);
     foreach ($shops as $shop) {
         $result &= Db::getInstance()->insert('cms_block_shop', array('id_cms_block' => $id_cms_block, 'id_shop' => $shop));
     }
     $languages = Language::getLanguages(false);
     foreach ($languages as $lang) {
         $result &= Db::getInstance()->insert('cms_block_lang', array('id_cms_block' => $id_cms_block, 'id_lang' => $lang['id_lang'], 'name' => $this->l('Information')));
     }
     $pages = CMS::getCMSPages(null, 1);
     foreach ($pages as $cms) {
         $result &= Db::getInstance()->insert('cms_block_page', array('id_cms_block' => $id_cms_block, 'id_cms' => $cms['id_cms'], 'is_category' => 0));
     }
     return $result;
 }
Example #21
0
 public function install()
 {
     if (!parent::install() || !$this->registerHook('displayTop') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT3,CAT26') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_SEARCH', '1') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCategoryAddAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectCmsAddAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectSupplierAddAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectManufacturerAddAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->installDB()) {
         return false;
     }
     return true;
 }
Example #22
0
 public function install()
 {
     if (!parent::install() || !$this->registerHook('displayArptActionPayCommon') || !$this->registerHook('displayArptActionPayCart') || !$this->registerHook('displayArptActionPaySteps')) {
         return false;
     }
     return true;
 }
 function install()
 {
     Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', true);
     Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', 5);
     Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', true);
     return parent::install() and $this->registerHook('leftColumn') and $this->registerHook('header');
 }
 public function install()
 {
     if (!parent::install() || !$this->registerHook('updateOrderStatus') || !$this->registerHook('updateCarrier') || !$this->installDB() || !$this->installConfig()) {
         return false;
     }
     return true;
 }
 public function install()
 {
     if (!parent::install() || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_HOME', '1') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->registerHook('displayNavigationBar') || !$this->installDB()) {
         return false;
     }
     return true;
 }
Example #26
0
 function install()
 {
     if (!Configuration::updateValue('HOME_FEATURED_NBR', 8) or !parent::install() or !$this->registerHook('home')) {
         return false;
     }
     return true;
 }
Example #27
0
 public function install()
 {
     if (!parent::install() || !$this->registerHooks() || !BlockCMSModel::createTables() || !Configuration::updateValue('FOOTER_CMS', '') || !Configuration::updateValue('FOOTER_BLOCK_ACTIVATION', 1) || !Configuration::updateValue('FOOTER_POWEREDBY', 1)) {
         return false;
     }
     // Install fixtures for blockcms
     $default = Db::getInstance()->insert('cms_block', array('id_cms_category' => 1, 'location' => 0, 'position' => 0));
     if (!$default) {
         return false;
     }
     $result = true;
     $id_cms_block = Db::getInstance()->Insert_ID();
     $shops = Shop::getShops(true, null, true);
     foreach ($shops as $shop) {
         $result &= Db::getInstance()->insert('cms_block_shop', array('id_cms_block' => $id_cms_block, 'id_shop' => $shop));
     }
     $languages = Language::getLanguages(false);
     foreach ($languages as $lang) {
         $result &= Db::getInstance()->insert('cms_block_lang', array('id_cms_block' => $id_cms_block, 'id_lang' => $lang['id_lang'], 'name' => $this->l('Information')));
     }
     $pages = CMS::getCMSPages(null, 1);
     foreach ($pages as $cms) {
         $result &= Db::getInstance()->insert('cms_block_page', array('id_cms_block' => $id_cms_block, 'id_cms' => $cms['id_cms'], 'is_category' => 0));
     }
     return $result;
 }
Example #28
0
    public function install()
    {
        if (version_compare(_PS_VERSION_, '1.5', '>=') && Shop::isFeatureActive()) {
            Shop::setContext(Shop::CONTEXT_ALL);
        }
        if (!parent::install() || !$this->installTab() || !$this->registerHook('header') || !$this->registerHook('adminOrder') || !$this->registerHook('footer') || !$this->registerHook('home') || !$this->registerHook('productfooter') || !$this->registerHook('orderConfirmation') || !$this->registerHook('backOfficeHeader')) {
            return false;
        }
        if (version_compare(_PS_VERSION_, '1.5', '>=') && (!$this->registerHook('actionProductCancel') || !$this->registerHook('actionCartSave'))) {
            return false;
        }
        Db::getInstance()->Execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'ganalytics`');
        if (!Db::getInstance()->Execute('
			CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ganalytics` (
				`id_google_analytics` int(11) NOT NULL AUTO_INCREMENT,
				`id_order` int(11) NOT NULL,
				`id_customer` int(10) NOT NULL,
				`id_shop` int(11) NOT NULL,
				`sent` tinyint(1) DEFAULT NULL,
				`date_add` datetime DEFAULT NULL,
				PRIMARY KEY (`id_google_analytics`),
				KEY `id_order` (`id_order`),
				KEY `sent` (`sent`)
			) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1')) {
            return $this->uninstall();
        }
        return true;
    }
Example #29
0
 function install()
 {
     if (!parent::install() or !$this->registerHook('top') or !$this->registerHook('header')) {
         return false;
     }
     return true;
 }
 public function install()
 {
     if (!parent::install()) {
         return false;
     }
     // Insert currencies availability
     if ($this->currencies_mode == 'checkbox') {
         if (!$this->addCheckboxCurrencyRestrictionsForModule()) {
             return false;
         }
     } elseif ($this->currencies_mode == 'radio') {
         if (!$this->addRadioCurrencyRestrictionsForModule()) {
             return false;
         }
     } else {
         Tools::displayError('No currency mode for payment module');
     }
     // Insert countries availability
     $return = $this->addCheckboxCountryRestrictionsForModule();
     if (!Configuration::get('CONF_' . strtoupper($this->name) . '_FIXED')) {
         Configuration::updateValue('CONF_' . strtoupper($this->name) . '_FIXED', '0.2');
     }
     if (!Configuration::get('CONF_' . strtoupper($this->name) . '_VAR')) {
         Configuration::updateValue('CONF_' . strtoupper($this->name) . '_VAR', '2');
     }
     if (!Configuration::get('CONF_' . strtoupper($this->name) . '_FIXED_FOREIGN')) {
         Configuration::updateValue('CONF_' . strtoupper($this->name) . '_FIXED_FOREIGN', '0.2');
     }
     if (!Configuration::get('CONF_' . strtoupper($this->name) . '_VAR_FOREIGN')) {
         Configuration::updateValue('CONF_' . strtoupper($this->name) . '_VAR_FOREIGN', '2');
     }
     return $return;
 }