// Fixes to installer
This commit is contained in:
1 parent
278bbe5d39
commit
5d165a301d
2 files changed
+17
-11
No files matched your search
@@ -25,22 +25,21 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public function migrate_orders()
|
||||||
include('config/config.inc.php');
|
{
|
||||||
|
if (!defined('PS_TAX_EXC'))
|
||||||
if (!defined('PS_TAX_EXC'))
|
|
||||||
define('PS_TAX_EXC', 1);
|
define('PS_TAX_EXC', 1);
|
||||||
|
|
||||||
if (!defined('PS_TAX_INC'))
|
if (!defined('PS_TAX_INC'))
|
||||||
define('PS_TAX_INC', 0);
|
define('PS_TAX_INC', 0);
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM `'._DB_PREFIX_.'orders`';
|
FROM `'._DB_PREFIX_.'orders`';
|
||||||
|
|
||||||
$orders = Db::getInstance()->executeS($sql);
|
$orders = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
foreach ($orders as $order)
|
foreach ($orders as $order)
|
||||||
{
|
{
|
||||||
$sum_total_products = 0;
|
$sum_total_products = 0;
|
||||||
$sum_tax_amount = 0;
|
$sum_tax_amount = 0;
|
||||||
$default_group_id = getCustomerDefaultGroup((int)$order['id_customer']);
|
$default_group_id = getCustomerDefaultGroup((int)$order['id_customer']);
|
||||||
@@ -101,10 +100,9 @@ foreach ($orders as $order)
|
|||||||
Db::getInstance()->execute($sql);
|
Db::getInstance()->execute($sql);
|
||||||
|
|
||||||
unset($order);
|
unset($order);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getCustomerDefaultGroup($id_customer)
|
function getCustomerDefaultGroup($id_customer)
|
||||||
{
|
{
|
||||||
Db::getInstance()->getValue('SELECT `id_default_group` FROM `'._DB_PREFIX_.'customer` WHERE `id_customer` = '.(int)$id_customer);
|
Db::getInstance()->getValue('SELECT `id_default_group` FROM `'._DB_PREFIX_.'customer` WHERE `id_customer` = '.(int)$id_customer);
|
||||||
|
|||||||
@@ -149,6 +149,14 @@ require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'generate_order_reference.php');
|
|||||||
|
|
||||||
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'migrate_orders.php');
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'migrate_orders.php');
|
||||||
|
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_attribute_position.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_group_attribute_position.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_feature_position.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_default_restrictions_modules_groups.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_carrier_position.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_new_groups.php');
|
||||||
|
require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.'add_stock_tab.php');
|
||||||
|
|
||||||
//old version detection
|
//old version detection
|
||||||
global $oldversion, $logger;
|
global $oldversion, $logger;
|
||||||
$oldversion = false;
|
$oldversion = false;
|
||||||
|
|||||||
Reference in new issue
Block a user