diff --git a/install-new/upgrade/php/migrate_orders.php b/install-new/upgrade/php/migrate_orders.php index 132958985..970f6f930 100644 --- a/install-new/upgrade/php/migrate_orders.php +++ b/install-new/upgrade/php/migrate_orders.php @@ -186,7 +186,7 @@ function mo_getPriceDisplayMethod($id_group) static $cache; if (!isset($cache[$id_group])) - $cache[$id_group] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + $cache[$id_group] = Db::getInstance()->getValue(' SELECT `price_display_method` FROM `'._DB_PREFIX_.'group` WHERE `id_group` = '.(int)$id_group); diff --git a/install-new/upgrade/php/set_product_suppliers.php b/install-new/upgrade/php/set_product_suppliers.php index f2b6882a7..7a4f60ac8 100644 --- a/install-new/upgrade/php/set_product_suppliers.php +++ b/install-new/upgrade/php/set_product_suppliers.php @@ -5,7 +5,7 @@ function set_product_suppliers() FROM `'._DB_PREFIX_.'configuration` WHERE name="PS_CURRENCY_DEFAULT"'); //Get all products with positive quantity - $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query(' + $resource = Db::getInstance()->query(' SELECT id_supplier, id_product, supplier_reference, wholesale_price FROM `'._DB_PREFIX_.'product` WHERE `id_supplier` > 0 @@ -26,7 +26,7 @@ function set_product_suppliers() '); //Try to get product attribues - $attributes = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + $attributes = Db::getInstance()->executeS(' SELECT id_product_attribute, supplier_reference, wholesale_price FROM `'._DB_PREFIX_.'product_attribute` WHERE `id_product` = '.(int)$row['id_product'] diff --git a/install-new/upgrade/php/set_stock_available.php b/install-new/upgrade/php/set_stock_available.php index 60d16a2e9..8af0abd2b 100644 --- a/install-new/upgrade/php/set_stock_available.php +++ b/install-new/upgrade/php/set_stock_available.php @@ -2,7 +2,7 @@ function set_stock_available() { //Get all products with positive quantity - $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query(' + $resource = Db::getInstance()->query(' SELECT quantity, id_product, out_of_stock FROM `'._DB_PREFIX_.'product` WHERE `active` = 1 @@ -13,7 +13,7 @@ function set_stock_available() $quantity = 0; //Try to get product attribues - $attributes = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + $attributes = Db::getInstance()->executeS(' SELECT quantity, id_product_attribute FROM `'._DB_PREFIX_.'product_attribute` WHERE `id_product` = '.(int)$row['id_product'] @@ -48,4 +48,4 @@ function set_stock_available() ("'.(int)$row['id_product'].'", "0", "1", "0", "'.(int)$quantity.'", "0", "'.(int)$row['out_of_stock'].'") '); } -} \ No newline at end of file +} diff --git a/install-new/upgrade/php/update_order_canada.php b/install-new/upgrade/php/update_order_canada.php index 7d5b66efa..eb33821ca 100644 --- a/install-new/upgrade/php/update_order_canada.php +++ b/install-new/upgrade/php/update_order_canada.php @@ -66,7 +66,7 @@ function update_order_canada() // returns Group::getDefaultPriceDisplayMethod $tax_calculation_method = $order['price_display_method']; - $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' + $products = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = '.(int)$id_order); diff --git a/install-new/upgrade/php/update_stock_mvt_reason.php b/install-new/upgrade/php/update_stock_mvt_reason.php index 987eedcbd..146bc6d20 100644 --- a/install-new/upgrade/php/update_stock_mvt_reason.php +++ b/install-new/upgrade/php/update_stock_mvt_reason.php @@ -4,7 +4,7 @@ function update_stock_mvt_reason() { //Get all stock mvts reasons already presents in the solution (from 1.4.x) //Remove standard movements to keep only custom movement - $mvts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + $mvts = Db::getInstance()->executeS(' SELECT smr.* FROM `'._DB_PREFIX_.'stock_mvt_reason` WHERE `id` > 5 @@ -12,7 +12,7 @@ function update_stock_mvt_reason() //Get all stock mvts reasons language traduction already presents in the solution (from 1.4.x) //Remove standard movements to keep only custom movement - $mvts_lang = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + $mvts_lang = Db::getInstance()->executeS(' SELECT smrl.* FROM `'._DB_PREFIX_.'stock_movement_reason_lang` WHERE `id_stock_mvt_reason` > 5 @@ -105,4 +105,4 @@ function update_stock_mvt_reason() } } } -} \ No newline at end of file +}