first commit
This commit is contained in:
32
modules/ets_megamenu/upgrade/index.php
Normal file
32
modules/ets_megamenu/upgrade/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
?>
|
||||
149
modules/ets_megamenu/upgrade/install-2.0.1.php
Normal file
149
modules/ets_megamenu/upgrade/install-2.0.1.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Obj.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Menu.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Column.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Block.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Config.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Cache.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Tab.php');
|
||||
function upgrade_module_2_0_1($object)
|
||||
{
|
||||
$languages = Language::getLanguages(false);
|
||||
if(Ets_megamenu::$configs['configs'])
|
||||
{
|
||||
foreach(Ets_megamenu::$configs['configs'] as $key=> $config)
|
||||
{
|
||||
if(!Configuration::get($key))
|
||||
{
|
||||
if(isset($config['lang']) && $config['lang'])
|
||||
{
|
||||
$values = array();
|
||||
foreach($languages as $lang)
|
||||
{
|
||||
$values[$lang['id_lang']] = isset($config['default']) ? $config['default'] : '';
|
||||
}
|
||||
Configuration::updateValue($key, $values,true);
|
||||
}
|
||||
else
|
||||
Configuration::updateValue($key, isset($config['default']) ? $config['default'] : '',true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Db::getInstance()->execute("
|
||||
CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."ets_mm_menu_shop` (
|
||||
`id_menu` int(10) unsigned NOT NULL,
|
||||
`id_shop` int(11) DEFAULT NULL
|
||||
)
|
||||
");
|
||||
Db::getInstance()->execute("
|
||||
CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."ets_mm_tab` (
|
||||
`id_tab` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_menu` INT(11) NOT NULL,
|
||||
`enabled` INT(11) NOT NULL,
|
||||
`tab_img_link` text,
|
||||
`tab_sub_width` text,
|
||||
`tab_sub_content_pos` INT(11) NOT NULL,
|
||||
`tab_icon` varchar(22),
|
||||
`bubble_text_color` varchar(50) DEFAULT NULL,
|
||||
`bubble_background_color` varchar(50) DEFAULT NULL,
|
||||
`sort_order` int(11) DEFAULT NULL,
|
||||
`background_image` varchar(200) DEFAULT NULL,
|
||||
`position_background` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`id_tab`)
|
||||
)
|
||||
");
|
||||
Db::getInstance()->execute("
|
||||
CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."ets_mm_tab_lang` (
|
||||
`id_tab` int(10) UNSIGNED NOT NULL,
|
||||
`id_lang` int(10) UNSIGNED NOT NULL,
|
||||
`bubble_text` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`title` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
||||
)
|
||||
");
|
||||
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'ets_mm_menu` CHANGE `sub_menu_max_width` `sub_menu_max_width` VARCHAR(500) NOT NULL');
|
||||
Db::getInstance()->execute(
|
||||
$object->alterSQL('ets_mm_menu','menu_open_new_tab', 'text NOT NULL AFTER `custom_class`').
|
||||
$object->alterSQL('ets_mm_menu','id_supplier', 'text NOT NULL AFTER `custom_class`').
|
||||
$object->alterSQL('ets_mm_menu','menu_img_link', 'text NOT NULL AFTER `custom_class`').
|
||||
$object->alterSQL('ets_mm_menu','menu_icon', 'varchar(222) NOT NULL AFTER `custom_class`').
|
||||
$object->alterSQL('ets_mm_block','id_suppliers', 'varchar(222) NOT NULL AFTER `id_categories`').
|
||||
$object->alterSQL('ets_mm_block','order_by_category', 'varchar(222) NOT NULL AFTER `id_categories`').
|
||||
$object->alterSQL('ets_mm_block','order_by_manufacturers', 'varchar(222) NOT NULL AFTER `id_manufacturers`').
|
||||
$object->alterSQL('ets_mm_block','order_by_suppliers', 'varchar(222) NOT NULL AFTER `id_categories`').
|
||||
$object->alterSQL('ets_mm_menu','display_tabs_in_full_width', 'varchar(50) NOT NULL').
|
||||
$object->alterSQL('ets_mm_block','show_description', 'INT(1) NOT NULL').
|
||||
$object->alterSQL('ets_mm_block','show_clock', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_mnu_img', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_mnu_name', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_mnu_inline', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_suppliers_img', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_suppliers_name', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_block','display_suppliers_inline', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','enabled_vertical', 'INT(1) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','tab_item_width', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','menu_item_width', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','background_image', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','position_background', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','menu_ver_text_color', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','menu_ver_background_color', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_menu','menu_ver_hidden_border', 'varchar(50) NOT NULL ').
|
||||
$object->alterSQL('ets_mm_column','id_tab', 'INT(11) NOT NULL')
|
||||
);
|
||||
|
||||
$menus=Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'ets_mm_menu WHERE id_menu NOT IN (SELECT id_menu FROM '._DB_PREFIX_.'ets_mm_menu_shop)');
|
||||
if($menus)
|
||||
{
|
||||
foreach($menus as $menu)
|
||||
{
|
||||
$shops = Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop');
|
||||
foreach($shops as $shop)
|
||||
{
|
||||
$id_shop=$shop['id_shop'];
|
||||
if($id_shop==Context::getContext()->shop->id)
|
||||
{
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'ets_mm_menu_shop` (`id_shop`, `id_menu`)
|
||||
VALUES('.(int)$id_shop.', '.(int)$menu['id_menu'].')'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$menuObj = new MM_Menu($menu['id_menu']);
|
||||
if($newObj=$menuObj->duplicateItem())
|
||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'ets_mm_menu_shop SET id_shop="'.(int)$id_shop.'" where id_menu='.(int)$newObj->id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$object->registerHook('displayCustomMenu');
|
||||
$object->registerHook('displayCustomerInforTop');
|
||||
$object->registerHook('displaySearch');
|
||||
$object->registerHook('displayCartTop');
|
||||
$object->registerHook('displayMMItemTab');
|
||||
return true;
|
||||
}
|
||||
37
modules/ets_megamenu/upgrade/install-2.0.2.php
Normal file
37
modules/ets_megamenu/upgrade/install-2.0.2.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Obj.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Menu.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Column.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Block.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Config.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Cache.php');
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Tab.php');
|
||||
function upgrade_module_2_0_2($object)
|
||||
{
|
||||
return (bool)Db::getInstance()->execute(
|
||||
$object->alterSQL('ets_mm_tab','url', 'text NOT NULL')
|
||||
);
|
||||
}
|
||||
32
modules/ets_megamenu/upgrade/install-2.0.3.php
Normal file
32
modules/ets_megamenu/upgrade/install-2.0.3.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
require_once(dirname(__FILE__) . '/../classes/MM_Products.php');
|
||||
function upgrade_module_2_0_3($object)
|
||||
{
|
||||
return (bool)Db::getInstance()->execute(
|
||||
$object->alterSQL('ets_mm_block', 'product_count', 'int(11) NOT NULL AFTER id_products').
|
||||
$object->alterSQL('ets_mm_menu', 'menu_ver_alway_show', 'tinyint(1) NULL DEFAULT NULL AFTER position_background')
|
||||
);
|
||||
}
|
||||
28
modules/ets_megamenu/upgrade/install-2.0.5.php
Normal file
28
modules/ets_megamenu/upgrade/install-2.0.5.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
function upgrade_module_2_0_5($object)
|
||||
{
|
||||
return $object->registerHook('displayNavFullWidth');
|
||||
}
|
||||
30
modules/ets_megamenu/upgrade/install-2.0.6.php
Normal file
30
modules/ets_megamenu/upgrade/install-2.0.6.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Config.php');
|
||||
function upgrade_module_2_0_6($object)
|
||||
{
|
||||
$config = new MM_Config();
|
||||
return is_object($object) && $config->installConfigs(true);
|
||||
}
|
||||
31
modules/ets_megamenu/upgrade/install-2.0.7.php
Normal file
31
modules/ets_megamenu/upgrade/install-2.0.7.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_0_7($object)
|
||||
{
|
||||
return (bool)Db::getInstance()->execute(
|
||||
$object->alterSQL('ets_mm_block', 'display_image_cat', 'int(1) tinyint(1) NOT NULL DEFAULT "1"')
|
||||
);
|
||||
}
|
||||
30
modules/ets_megamenu/upgrade/install-2.0.8.php
Normal file
30
modules/ets_megamenu/upgrade/install-2.0.8.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_0_8()
|
||||
{
|
||||
Configuration::updateValue('ETS_MM_ACTIVE_BG_GRAY',1);
|
||||
return true;
|
||||
}
|
||||
30
modules/ets_megamenu/upgrade/install-2.1.8.php
Normal file
30
modules/ets_megamenu/upgrade/install-2.1.8.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_1_8($object)
|
||||
{
|
||||
$object->dropTable('ets_mm_block', 'display_image_cat');
|
||||
return true;
|
||||
}
|
||||
37
modules/ets_megamenu/upgrade/install-2.1.9.php
Normal file
37
modules/ets_megamenu/upgrade/install-2.1.9.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
require_once(dirname(__FILE__).'/../classes/MM_Config.php');
|
||||
function upgrade_module_2_1_9($object)
|
||||
{
|
||||
$res = ets_menu_update_configuration_haimotchin($object);
|
||||
return $res;
|
||||
}
|
||||
|
||||
if ( ! function_exists('ets_menu_update_configuration_haimotchin') ){
|
||||
function ets_menu_update_configuration_haimotchin($object){
|
||||
$config = new MM_Config();
|
||||
return is_object($object) && $config->installConfigs(true);
|
||||
}
|
||||
}
|
||||
63
modules/ets_megamenu/upgrade/install-2.2.3.php
Normal file
63
modules/ets_megamenu/upgrade/install-2.2.3.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2021 ETS-Soft
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
|
||||
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
|
||||
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please contact us for extra customization service at an affordable price
|
||||
*
|
||||
* @author ETS-Soft <etssoft.jsc@gmail.com>
|
||||
* @copyright 2007-2021 ETS-Soft
|
||||
* @license Valid for 1 website (or project) for each purchase of license
|
||||
* International Registered Trademark & Property of ETS-Soft
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_2_3()
|
||||
{
|
||||
mmg_check_colum('ets_mm_menu', 'menu_ver_alway_open_first', 'tinyint(1) UNSIGNED NOT NULL DEFAULT "1" AFTER `menu_ver_alway_show`');
|
||||
mmg_check_update();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! function_exists('mmg_check_colum')){
|
||||
function mmg_check_colum($table, $column, $suffix)
|
||||
{
|
||||
return Db::getInstance()->execute('
|
||||
SET @dbname = DATABASE();
|
||||
SET @tablename = "' . _DB_PREFIX_ . pSQL($table) . '";
|
||||
SET @columnname = "' . pSQL($column) . '";
|
||||
SET @suffix = "' . pSQL($suffix) . '";
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE
|
||||
(table_name = @tablename)
|
||||
AND (table_schema = @dbname)
|
||||
AND (column_name = @columnname)
|
||||
) > 0,
|
||||
"SELECT 1",
|
||||
CONCAT("ALTER TABLE ", @tablename, " ADD ", @columnname," ", @suffix)
|
||||
));
|
||||
PREPARE alterIfNotExists FROM @preparedStatement;
|
||||
EXECUTE alterIfNotExists;
|
||||
DEALLOCATE PREPARE alterIfNotExists;
|
||||
');
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('mmg_check_update')){
|
||||
function mmg_check_update(){
|
||||
DB::getInstance()->execute('UPDATE `'._DB_PREFIX_.'ets_mm_menu` SET `menu_ver_alway_open_first`=1');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user