/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* 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 refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <*****@*****.**>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
include dirname(__FILE__) . '/../../../config/config.inc.php';
include_once dirname(__FILE__) . '/../classes/Toolbox.php';
if (Tools::getValue('token') != Tools::encrypt(Configuration::get('PS_SHOP_NAME'))) {
    die(Tools::displayError());
}
ToolBox::setNetEvenCategories(true);
die;
예제 #2
0
    public function installDB()
    {
        // Creation of the tables in a database
        $result = true;
        $queries = array();
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway_order_state` (
			`id_order_gateway_order_state` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`id_order` INT UNSIGNED NOT NULL,
			`id_order_state` INT UNSIGNED NOT NULL,
			`date_add` DATETIME NOT NULL,
			`date_upd` DATETIME NOT NULL,
			PRIMARY KEY (`id_order_gateway_order_state`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway` (
			`id_order_gateway` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`id_order_neteven` INT UNSIGNED NOT NULL,
			`id_order_detail_neteven` INT UNSIGNED NOT NULL,
			`id_order` INT UNSIGNED NOT NULL,
			`date_add` DATETIME NOT NULL,
			`date_upd` DATETIME NOT NULL,
			PRIMARY KEY (`id_order_gateway`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway_customer` (
			`id_order_gateway_customer` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`id_customer_neteven` INT UNSIGNED,
			`id_customer` INT UNSIGNED NOT NULL,
			`mail_customer_neteven` VARCHAR(255),
			`date_add` DATETIME NOT NULL,
			PRIMARY KEY (`id_order_gateway_customer`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway_configuration` (
			`id_order_gateway_configuration` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`name` VARCHAR(255),
			`value` VARCHAR(255),
			PRIMARY KEY (`id_order_gateway_configuration`),
			KEY `name` (`name`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway_feature_link` (
			`id_order_gateway_feature_link` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`id_order_gateway_feature` INT UNSIGNED NOT NULL,
			`id_feature` INT UNSIGNED,
			`id_attribute_group` INT UNSIGNED,
			PRIMARY KEY (`id_order_gateway_feature_link`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        $queries[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'orders_gateway_feature` (
			`id_order_gateway_feature` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			`name` VARCHAR(255),
			`value` VARCHAR(255),
			`category` VARCHAR(255),
			PRIMARY KEY (`id_order_gateway_feature`)
		) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
        foreach ($queries as $query) {
            $result &= Db::getInstance()->Execute($query);
        }
        if (!$result) {
            return false;
        }
        // Update table `orders_gateway_feature`
        ToolBox::setNetEvenCategories();
        return true;
    }
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* 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 refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <*****@*****.**>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
include dirname(__FILE__) . '/../../../config/config.inc.php';
include_once dirname(__FILE__) . '/../classes/Toolbox.php';
if (Tools::getValue('token') != Tools::encrypt(Configuration::get('PS_SHOP_NAME'))) {
    die(Tools::displayError());
}
ToolBox::setNetEvenCategories();