// Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names
This commit is contained in:
@@ -34,7 +34,7 @@ class AdminPreferences extends AdminTab
|
||||
$this->className = 'Configuration';
|
||||
$this->table = 'configuration';
|
||||
|
||||
$timezones = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT name FROM '._DB_PREFIX_.'timezone');
|
||||
$timezones = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT name FROM '._DB_PREFIX_.'timezone');
|
||||
$taxes[] = array('id' => 0, 'name' => $this->l('None'));
|
||||
/* foreach (Tax::getTaxes((int)($cookie->id_lang)) as $tax)
|
||||
$taxes[] = array('id' => $tax['id_tax'], 'name' => $tax['name']);
|
||||
|
||||
@@ -522,7 +522,7 @@ abstract class AdminSelfTab
|
||||
$required_fields[(int)$row['id_required_field']] = $row['field_name'];
|
||||
|
||||
|
||||
$table_fields = Db::getInstance()->ExecuteS('SHOW COLUMNS FROM '.pSQL(_DB_PREFIX_.$this->table));
|
||||
$table_fields = Db::getInstance()->executeS('SHOW COLUMNS FROM '.pSQL(_DB_PREFIX_.$this->table));
|
||||
$irow = 0;
|
||||
foreach ($table_fields AS $field)
|
||||
{
|
||||
@@ -1397,7 +1397,7 @@ abstract class AdminSelfTab
|
||||
($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '').'
|
||||
LIMIT '.(int)($start).','.(int)($limit);
|
||||
|
||||
$this->_list = Db::getInstance()->ExecuteS($sql);
|
||||
$this->_list = Db::getInstance()->executeS($sql);
|
||||
$this->_listTotal = Db::getInstance()->getValue('SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`');
|
||||
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ class BackupCore
|
||||
fwrite($fp, "\n".'SET NAMES \'utf8\';'."\n\n");
|
||||
|
||||
// Find all tables
|
||||
$tables = Db::getInstance()->ExecuteS('SHOW TABLES');
|
||||
$tables = Db::getInstance()->executeS('SHOW TABLES');
|
||||
$found = 0;
|
||||
foreach ($tables AS $table)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ class BackupCore
|
||||
continue;
|
||||
|
||||
// Export the table schema
|
||||
$schema = Db::getInstance()->ExecuteS('SHOW CREATE TABLE `' . $table . '`');
|
||||
$schema = Db::getInstance()->executeS('SHOW CREATE TABLE `' . $table . '`');
|
||||
|
||||
if (count($schema) != 1 || !isset($schema[0]['Table']) || !isset($schema[0]['Create Table']))
|
||||
{
|
||||
@@ -244,7 +244,7 @@ class BackupCore
|
||||
|
||||
if (!in_array($schema[0]['Table'], $ignore_insert_table))
|
||||
{
|
||||
$data = Db::getInstance()->ExecuteS('SELECT * FROM `' . $schema[0]['Table'] . '`', false);
|
||||
$data = Db::getInstance()->executeS('SELECT * FROM `' . $schema[0]['Table'] . '`', false);
|
||||
$sizeof = DB::getInstance()->NumRows();
|
||||
$lines = explode("\n", $schema[0]['Create Table']);
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ abstract class SelfModule
|
||||
if (self::$modulesCache == NULL AND !is_array(self::$modulesCache))
|
||||
{
|
||||
self::$modulesCache = array();
|
||||
$result = Db::getInstance()->ExecuteS('SELECT * FROM `'.pSQL(_DB_PREFIX_.$this->table).'`');
|
||||
$result = Db::getInstance()->executeS('SELECT * FROM `'.pSQL(_DB_PREFIX_.$this->table).'`');
|
||||
foreach ($result as $row)
|
||||
self::$modulesCache[$row['name']] = $row;
|
||||
}
|
||||
@@ -150,19 +150,19 @@ abstract class SelfModule
|
||||
{
|
||||
if (!Validate::isUnsignedId($this->id))
|
||||
return false;
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_hook`
|
||||
FROM `'._DB_PREFIX_.'hook_module` hm
|
||||
WHERE `id_module` = '.(int)($this->id));
|
||||
foreach ($result AS $row)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'hook_module`
|
||||
WHERE `id_module` = '.(int)($this->id).'
|
||||
AND `id_hook` = '.(int)($row['id_hook']));
|
||||
$this->cleanPositions($row['id_hook']);
|
||||
}
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'module`
|
||||
WHERE `id_module` = '.(int)($this->id));
|
||||
}
|
||||
@@ -183,7 +183,7 @@ abstract class SelfModule
|
||||
foreach ($name as $k=>$v)
|
||||
$name[$k] = '"'.pSQL($v).'"';
|
||||
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'module`
|
||||
SET `active`= 1
|
||||
WHERE `name` IN ('.implode(',',$name).')');
|
||||
@@ -193,7 +193,7 @@ abstract class SelfModule
|
||||
*/
|
||||
public function enable()
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'module`
|
||||
SET `active`= 1
|
||||
WHERE `name` = \''.pSQL($this->name).'\'');
|
||||
@@ -215,7 +215,7 @@ abstract class SelfModule
|
||||
foreach ($name as $k=>$v)
|
||||
$name[$k] = '"'.pSQL($v).'"';
|
||||
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'module`
|
||||
SET `active`= 0
|
||||
WHERE `name` IN ('.implode(',',$name).')');
|
||||
@@ -268,7 +268,7 @@ abstract class SelfModule
|
||||
return false;
|
||||
|
||||
// Register module in hook
|
||||
$return = Db::getInstance()->Execute('
|
||||
$return = Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`)
|
||||
VALUES ('.(int)($this->id).', '.(int)($result['id_hook']).', '.(int)($result2['position'] + 1).')');
|
||||
|
||||
@@ -313,7 +313,7 @@ abstract class SelfModule
|
||||
*/
|
||||
public function unregisterHook($hook_id)
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE
|
||||
FROM `'._DB_PREFIX_.'hook_module`
|
||||
WHERE `id_module` = '.(int)($this->id).'
|
||||
@@ -328,7 +328,7 @@ abstract class SelfModule
|
||||
*/
|
||||
public function unregisterExceptions($hook_id)
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE
|
||||
FROM `'._DB_PREFIX_.'hook_module_exceptions`
|
||||
WHERE `id_module` = '.(int)($this->id).'
|
||||
@@ -348,7 +348,7 @@ abstract class SelfModule
|
||||
{
|
||||
if (!empty($except))
|
||||
{
|
||||
$result = Db::getInstance()->Execute('
|
||||
$result = Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`)
|
||||
VALUES ('.(int)($this->id).', '.(int)($id_hook).', \''.pSQL(strval($except)).'\')');
|
||||
if (!$result)
|
||||
@@ -361,7 +361,7 @@ abstract class SelfModule
|
||||
public function editExceptions($id_hook, $excepts)
|
||||
{
|
||||
// Cleaning...
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'hook_module_exceptions`
|
||||
WHERE `id_module` = '.(int)($this->id).' AND `id_hook` ='.(int)($id_hook));
|
||||
return $this->registerExceptions($id_hook, $excepts);
|
||||
@@ -642,7 +642,7 @@ abstract class SelfModule
|
||||
$arrNativeModules[] = '"'.pSQL($module['name']).'"';
|
||||
}
|
||||
|
||||
return $db->ExecuteS('
|
||||
return $db->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'module` m
|
||||
WHERE name NOT IN ('.implode(',',$arrNativeModules).') ');
|
||||
@@ -656,7 +656,7 @@ abstract class SelfModule
|
||||
*/
|
||||
public static function getModulesInstalled($position = 0)
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'module` m
|
||||
'.($position ? '
|
||||
@@ -689,7 +689,7 @@ abstract class SelfModule
|
||||
if (!isset(self::$_hookModulesCache))
|
||||
{
|
||||
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
|
||||
$result = $db->ExecuteS('
|
||||
$result = $db->executeS('
|
||||
SELECT h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit`
|
||||
FROM `'._DB_PREFIX_.'module` m
|
||||
LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module`
|
||||
@@ -774,7 +774,7 @@ abstract class SelfModule
|
||||
$id_customer = (int)($cookie->id_customer);
|
||||
$billing = new Address((int)($cart->id_address_invoice));
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position`
|
||||
FROM `'._DB_PREFIX_.'module_country` mc
|
||||
LEFT JOIN `'._DB_PREFIX_.'module` m ON m.`id_module` = mc.`id_module`
|
||||
@@ -868,7 +868,7 @@ abstract class SelfModule
|
||||
*/
|
||||
public function updatePosition($id_hook, $way, $position = NULL)
|
||||
{
|
||||
if (!$res = Db::getInstance()->ExecuteS('
|
||||
if (!$res = Db::getInstance()->executeS('
|
||||
SELECT hm.`id_module`, hm.`position`, hm.`id_hook`
|
||||
FROM `'._DB_PREFIX_.'hook_module` hm
|
||||
WHERE hm.`id_hook` = '.(int)($id_hook).'
|
||||
@@ -888,13 +888,13 @@ abstract class SelfModule
|
||||
if (isset($position) and !empty($position))
|
||||
$to['position'] = (int)($position);
|
||||
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'hook_module`
|
||||
SET `position`= position '.($way ? '-1' : '+1').'
|
||||
WHERE position between '.(int)(min(array($from['position'], $to['position']))) .' AND '.(int)(max(array($from['position'], $to['position']))).'
|
||||
AND `id_hook`='.(int)($from['id_hook']))
|
||||
AND
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'hook_module`
|
||||
SET `position`='.(int)($to['position']).'
|
||||
WHERE `'.pSQL($this->identifier).'` = '.(int)($from[$this->identifier]).' AND `id_hook`='.(int)($to['id_hook']))
|
||||
@@ -908,14 +908,14 @@ abstract class SelfModule
|
||||
*/
|
||||
public function cleanPositions($id_hook)
|
||||
{
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_module`
|
||||
FROM `'._DB_PREFIX_.'hook_module`
|
||||
WHERE `id_hook` = '.(int)($id_hook).'
|
||||
ORDER BY `position`');
|
||||
$sizeof = sizeof($result);
|
||||
for ($i = 0; $i < $sizeof; ++$i)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'hook_module`
|
||||
SET `position` = '.(int)($i + 1).'
|
||||
WHERE `id_hook` = '.(int)($id_hook).'
|
||||
@@ -976,7 +976,7 @@ abstract class SelfModule
|
||||
if (self::$exceptionsCache == NULL AND !is_array(self::$exceptionsCache))
|
||||
{
|
||||
self::$exceptionsCache = array();
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT CONCAT(id_hook, \'-\', id_module) as `key`, `file_name` as value
|
||||
FROM `'._DB_PREFIX_.'hook_module_exceptions`');
|
||||
foreach ($result as $row)
|
||||
@@ -993,7 +993,7 @@ abstract class SelfModule
|
||||
|
||||
public static function isInstalled($moduleName)
|
||||
{
|
||||
Db::getInstance()->ExecuteS('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($moduleName).'\'');
|
||||
Db::getInstance()->executeS('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($moduleName).'\'');
|
||||
return (bool)Db::getInstance()->NumRows();
|
||||
}
|
||||
|
||||
|
||||
@@ -817,7 +817,7 @@ class Tools14Core
|
||||
|
||||
if (isset($category['id_category']))
|
||||
{
|
||||
$categories = Db::getInstance()->ExecuteS('
|
||||
$categories = Db::getInstance()->executeS('
|
||||
SELECT c.id_category, cl.name, cl.link_rewrite
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category)
|
||||
|
||||
@@ -144,7 +144,7 @@ function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryT
|
||||
|
||||
if (isset($category['id_category']))
|
||||
{
|
||||
$categories = Db::getInstance()->ExecuteS('
|
||||
$categories = Db::getInstance()->executeS('
|
||||
SELECT c.id_category, cl.name, cl.link_rewrite
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category)
|
||||
|
||||
@@ -113,7 +113,7 @@ class BirthdayPresent extends Module
|
||||
|
||||
public function createTodaysVouchers()
|
||||
{
|
||||
$users = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$users = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT c.id_customer, firstname, lastname, email
|
||||
FROM '._DB_PREFIX_.'customer c
|
||||
LEFT JOIN '._DB_PREFIX_.'orders o ON (c.id_customer = o.id_customer)
|
||||
|
||||
@@ -156,7 +156,7 @@ class BlockCategories extends Module
|
||||
if (!$this->isCached('blockcategories.tpl', $smartyCacheId))
|
||||
{
|
||||
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->sqlLang('cl').')
|
||||
@@ -229,7 +229,7 @@ class BlockCategories extends Module
|
||||
{
|
||||
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
|
||||
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->sqlLang('cl').')
|
||||
|
||||
@@ -39,14 +39,14 @@ if (Tools::getValue('action') == 'getCms')
|
||||
if (!Validate::isInt(Tools::getValue('id_cms_category')) OR !Tools::getValue('id_cms_category'))
|
||||
die(1);
|
||||
|
||||
$cms_categories = Db::getInstance()->ExecuteS('
|
||||
$cms_categories = Db::getInstance()->executeS('
|
||||
SELECT * FROM `'._DB_PREFIX_.'cms_category` c
|
||||
JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category`)
|
||||
WHERE c.`id_parent` = '.(int)Tools::getValue('id_cms_category').'
|
||||
AND cl.`id_lang` = '.(int)$context->language->id.'
|
||||
ORDER BY c.`id_cms_category`');
|
||||
|
||||
$cms_pages = Db::getInstance()->ExecuteS('
|
||||
$cms_pages = Db::getInstance()->executeS('
|
||||
SELECT cl.`meta_title`, c.`id_cms` FROM `'._DB_PREFIX_.'cms` c
|
||||
JOIN `'._DB_PREFIX_.'cms_lang` cl ON (c.`id_cms` = cl.`id_cms`)
|
||||
WHERE c.`id_cms_category` = '.(int)Tools::getValue('id_cms_category').'
|
||||
@@ -55,7 +55,7 @@ if (Tools::getValue('action') == 'getCms')
|
||||
ORDER BY c.`id_cms`');
|
||||
|
||||
if (Tools::getValue('id_cms_block'))
|
||||
$cms_selected = Db::getInstance()->ExecuteS('
|
||||
$cms_selected = Db::getInstance()->executeS('
|
||||
SELECT `is_category`, `id_cms` FROM `'._DB_PREFIX_.'cms_block_page`
|
||||
WHERE `id_cms_block` = '.(int)Tools::getValue('id_cms_block'));
|
||||
|
||||
@@ -106,7 +106,7 @@ elseif (Tools::getValue('action') == 'dnd')
|
||||
foreach ($table as $key =>$row)
|
||||
{
|
||||
$ids = explode('_', $row);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = '.(int)$pos.'
|
||||
WHERE `id_cms_block` = '.(int)$ids[2]);
|
||||
|
||||
@@ -58,7 +58,7 @@ class BlockCms extends Module
|
||||
$queryLang .= '(1, '.(int)($language['id_lang']).'),';
|
||||
|
||||
if (!parent::install() OR !$this->registerHook('leftColumn') OR !$this->registerHook('rightColumn') OR !$this->registerHook('footer') OR !$this->registerHook('header') OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block`(
|
||||
`id_cms_block` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_cms_category` int(10) unsigned NOT NULL,
|
||||
@@ -67,17 +67,17 @@ class BlockCms extends Module
|
||||
`display_store` tinyint(1) unsigned NOT NULL default \'1\',
|
||||
PRIMARY KEY (`id_cms_block`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8') OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)') OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_lang`(
|
||||
`id_cms_block` int(10) unsigned NOT NULL,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`name` varchar(40) NOT NULL default \'\',
|
||||
PRIMARY KEY (`id_cms_block`, `id_lang`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8') OR
|
||||
!Db::getInstance()->Execute(rtrim($queryLang, ',')) OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute(rtrim($queryLang, ',')) OR
|
||||
!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_page`(
|
||||
`id_cms_block_page` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_cms_block` int(10) unsigned NOT NULL,
|
||||
@@ -98,14 +98,14 @@ class BlockCms extends Module
|
||||
!Configuration::deleteByName('FOOTER_CMS') OR
|
||||
!Configuration::deleteByName('FOOTER_BLOCK_ACTIVATION') OR
|
||||
!Configuration::deleteByName('FOOTER_POWEREDBY') OR
|
||||
!Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'cms_block` , `'._DB_PREFIX_.'cms_block_page`, `'._DB_PREFIX_.'cms_block_lang`'))
|
||||
!Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'cms_block` , `'._DB_PREFIX_.'cms_block_page`, `'._DB_PREFIX_.'cms_block_lang`'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getBlockCMS($id_cms_block)
|
||||
{
|
||||
$cmsBlocks = Db::getInstance()->ExecuteS('
|
||||
$cmsBlocks = Db::getInstance()->executeS('
|
||||
SELECT cb.`id_cms_category`, cb.`location`, cb.`display_store`, cbl.id_lang, cbl.name
|
||||
FROM `'._DB_PREFIX_.'cms_block` cb
|
||||
LEFT JOIN `'._DB_PREFIX_.'cms_block_lang` cbl ON (cbl.`id_cms_block` = cb.`id_cms_block`)
|
||||
@@ -125,7 +125,7 @@ class BlockCms extends Module
|
||||
private function getBlocksCMS($location)
|
||||
{
|
||||
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT bc.`id_cms_block`, bcl.`name` block_name, ccl.`name` category_name, bc.`position`, bc.`id_cms_category`, bc.`display_store`
|
||||
FROM `'._DB_PREFIX_.'cms_block` bc
|
||||
INNER JOIN `'._DB_PREFIX_.'cms_category_lang` ccl ON (bc.`id_cms_category` = ccl.`id_cms_category`)
|
||||
@@ -185,7 +185,7 @@ class BlockCms extends Module
|
||||
{
|
||||
$context = Context::getContext();
|
||||
|
||||
$cmsCategories = Db::getInstance()->ExecuteS('
|
||||
$cmsCategories = Db::getInstance()->executeS('
|
||||
SELECT bc.`id_cms_block`, bc.`id_cms_category`, bc.`display_store`, ccl.`link_rewrite`, ccl.`name` category_name, bcl.`name` block_name
|
||||
FROM `'._DB_PREFIX_.'cms_block` bc
|
||||
INNER JOIN `'._DB_PREFIX_.'cms_category_lang` ccl ON (bc.`id_cms_category` = ccl.`id_cms_category`)
|
||||
@@ -201,7 +201,7 @@ class BlockCms extends Module
|
||||
$key = (int)$cmsCategory['id_cms_block'];
|
||||
$content[$key]['display_store'] = $cmsCategory['display_store'];
|
||||
|
||||
$content[$key]['cms'] = Db::getInstance()->ExecuteS('
|
||||
$content[$key]['cms'] = Db::getInstance()->executeS('
|
||||
SELECT cl.`id_cms`, cl.`meta_title`, cl.`link_rewrite`
|
||||
FROM `'._DB_PREFIX_.'cms_block_page` bcp
|
||||
INNER JOIN `'._DB_PREFIX_.'cms_lang` cl ON (bcp.`id_cms` = cl.`id_cms`)
|
||||
@@ -219,7 +219,7 @@ class BlockCms extends Module
|
||||
|
||||
$content[$key]['cms'] = $links;
|
||||
|
||||
$content[$key]['categories'] = Db::getInstance()->ExecuteS('
|
||||
$content[$key]['categories'] = Db::getInstance()->executeS('
|
||||
SELECT bcp.`id_cms`, cl.`name`, cl.`link_rewrite`
|
||||
FROM `'._DB_PREFIX_.'cms_block_page` bcp
|
||||
INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (bcp.`id_cms` = cl.`id_cms_category`)
|
||||
@@ -606,24 +606,24 @@ class BlockCms extends Module
|
||||
$this->_html .= 'pos change!';
|
||||
if (Tools::getValue('way') == 0)
|
||||
{
|
||||
if (Db::getInstance()->Execute('
|
||||
if (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = '.((int)Tools::getValue('position') + 1).'
|
||||
WHERE `position` = '.((int)Tools::getValue('position')).'
|
||||
AND `location` = '.(int)Tools::getValue('location')))
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = '.((int)Tools::getValue('position')).'
|
||||
WHERE `id_cms_block` = '.(int)Tools::getValue('id_cms_block'));
|
||||
}
|
||||
elseif (Tools::getValue('way') == 1)
|
||||
{
|
||||
if(Db::getInstance()->Execute('
|
||||
if(Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = '.((int)Tools::getValue('position') - 1).'
|
||||
WHERE `position` = '.((int)Tools::getValue('position')).'
|
||||
AND `location` = '.(int)Tools::getValue('location')))
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = '.((int)Tools::getValue('position')).'
|
||||
WHERE `id_cms_block` = '.(int)Tools::getValue('id_cms_block'));
|
||||
@@ -642,18 +642,18 @@ class BlockCms extends Module
|
||||
$languages = Language::getLanguages(false);
|
||||
if (Tools::isSubmit('addBlockCMS'))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`, `display_store`)
|
||||
VALUES('.(int)Tools::getValue('id_category').', '.(int)Tools::getValue('block_location').',
|
||||
'.(int)$position.', '.(int)Tools::getValue('PS_STORES_DISPLAY_CMS').')');
|
||||
$id_cms_block = Db::getInstance()->Insert_ID();
|
||||
foreach ($languages as $language)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`)
|
||||
VALUES('.(int)$id_cms_block.', '.(int)$language['id_lang'].',
|
||||
"'.pSQL(Tools::getValue('block_name_'.$language['id_lang'])).'")');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `display_store` = '.Configuration::get('PS_STORES_DISPLAY_FOOTER'));
|
||||
}
|
||||
@@ -661,23 +661,23 @@ class BlockCms extends Module
|
||||
{
|
||||
$id_cms_block = Tools::getvalue('id_cms_block');
|
||||
|
||||
$old_block = Db::getInstance()->ExecuteS('
|
||||
$old_block = Db::getInstance()->executeS('
|
||||
SELECT `location`, `position`
|
||||
FROM `'._DB_PREFIX_.'cms_block`
|
||||
WHERE `id_cms_block` = '.(int)$id_cms_block);
|
||||
|
||||
$location_change = ($old_block[0]['location'] != (int)Tools::getvalue('block_location'));
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'cms_block_page`
|
||||
WHERE `id_cms_block` = '.(int)$id_cms_block);
|
||||
|
||||
if ($location_change == true)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = (`position` - 1) WHERE `position` > '.(int)$old_block[0]['position'].'
|
||||
AND `location` = '.(int)$old_block[0]['location']);
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `location` = '.(int)(Tools::getvalue('block_location')).',
|
||||
`id_cms_category` = '.(int)(Tools::getvalue('id_category')).'
|
||||
@@ -689,7 +689,7 @@ class BlockCms extends Module
|
||||
Configuration::updateValue('PS_STORES_DISPLAY_FOOTER', (int)(Tools::getValue('PS_STORES_DISPLAY_CMS')));
|
||||
|
||||
foreach ($languages as $language)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block_lang`
|
||||
SET `name` = "'.pSQL(Tools::getValue('block_name_'.$language['id_lang'])).'"
|
||||
WHERE `id_cms_block` = '.(int)$id_cms_block.'
|
||||
@@ -700,7 +700,7 @@ class BlockCms extends Module
|
||||
foreach ($cmsBoxes as $cmsBox)
|
||||
{
|
||||
$cms_properties = explode('_', $cmsBox);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'cms_block_page` (`id_cms_block`, `id_cms`, `is_category`)
|
||||
VALUES('.(int)$id_cms_block.', '.(int)$cms_properties[1].', '.(int)$cms_properties[0].')');
|
||||
}
|
||||
@@ -711,20 +711,20 @@ class BlockCms extends Module
|
||||
}
|
||||
elseif (Tools::isSubmit('deleteBlockCMS') AND Tools::getValue('id_cms_block'))
|
||||
{
|
||||
$old_block = Db::getInstance()->ExecuteS('SELECT `location`, `position` FROM `'._DB_PREFIX_.'cms_block` WHERE `id_cms_block` = '.Tools::getvalue('id_cms_block'));
|
||||
$old_block = Db::getInstance()->executeS('SELECT `location`, `position` FROM `'._DB_PREFIX_.'cms_block` WHERE `id_cms_block` = '.Tools::getvalue('id_cms_block'));
|
||||
if (sizeof($old_block))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block`
|
||||
SET `position` = (`position` - 1)
|
||||
WHERE `position` > '.(int)$old_block[0]['position'].'
|
||||
AND `location` = '.(int)$old_block[0]['location']);
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'cms_block`
|
||||
WHERE `id_cms_block` = '.(int)(Tools::getValue('id_cms_block')));
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'cms_block_page`
|
||||
WHERE `id_cms_block` = '.(int)(Tools::getValue('id_cms_block')));
|
||||
|
||||
|
||||
@@ -91,23 +91,23 @@ class BlockLayered extends Module
|
||||
Configuration::deleteByName('PS_LAYERED_SHOW_QTIES');
|
||||
Configuration::deleteByName('PS_LAYERED_INDEXED');
|
||||
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_price_index');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_friendly_url');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature_lang_value');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_filter');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_product_attribute');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_price_index');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_friendly_url');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature_lang_value');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_filter');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_product_attribute');
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
private static function installPriceIndexTable()
|
||||
{
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_price_index`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_price_index`');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_price_index` (
|
||||
`id_product` INT NOT NULL, `id_currency` INT NOT NULL,
|
||||
`price_min` INT NOT NULL, `price_max` INT NOT NULL,
|
||||
@@ -117,8 +117,8 @@ class BlockLayered extends Module
|
||||
|
||||
private function installFriendlyUrlTable()
|
||||
{
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_friendly_url`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_friendly_url`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_friendly_url` (
|
||||
`id_layered_friendly_url` INT NOT NULL AUTO_INCREMENT,
|
||||
`url_key` varchar(32) NOT NULL,
|
||||
@@ -127,24 +127,24 @@ class BlockLayered extends Module
|
||||
PRIMARY KEY (`id_layered_friendly_url`),
|
||||
INDEX `id_lang` (`id_lang`)) ENGINE = '._MYSQL_ENGINE_);
|
||||
|
||||
Db::getInstance()->Execute('CREATE INDEX `url_key` ON `'._DB_PREFIX_.'layered_friendly_url`(url_key(5))');
|
||||
Db::getInstance()->execute('CREATE INDEX `url_key` ON `'._DB_PREFIX_.'layered_friendly_url`(url_key(5))');
|
||||
}
|
||||
|
||||
private function installIndexableAttributeTable()
|
||||
{
|
||||
// Attributes Groups
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_group` (
|
||||
`id_attribute_group` INT NOT NULL,
|
||||
`indexable` BOOL NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_attribute_group`)) ENGINE = '._MYSQL_ENGINE_);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'layered_indexable_attribute_group`
|
||||
SELECT id_attribute_group, 1 FROM `'._DB_PREFIX_.'attribute_group`');
|
||||
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` (
|
||||
`id_attribute_group` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
@@ -153,8 +153,8 @@ class BlockLayered extends Module
|
||||
PRIMARY KEY (`id_attribute_group`, `id_lang`)) ENGINE = '._MYSQL_ENGINE_);
|
||||
|
||||
// Attributes
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_lang_value`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_lang_value`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` (
|
||||
`id_attribute` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
@@ -164,19 +164,19 @@ class BlockLayered extends Module
|
||||
|
||||
|
||||
// Features
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature` (
|
||||
`id_feature` INT NOT NULL,
|
||||
`indexable` BOOL NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_feature`)) ENGINE = '._MYSQL_ENGINE_);
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'layered_indexable_feature`
|
||||
SELECT id_feature, 1 FROM `'._DB_PREFIX_.'feature`');
|
||||
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_lang_value`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_lang_value`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature_lang_value` (
|
||||
`id_feature` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
@@ -185,8 +185,8 @@ class BlockLayered extends Module
|
||||
PRIMARY KEY (`id_feature`, `id_lang`)) ENGINE = '._MYSQL_ENGINE_);
|
||||
|
||||
// Features values
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value` (
|
||||
`id_feature_value` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
@@ -201,8 +201,8 @@ class BlockLayered extends Module
|
||||
*/
|
||||
public function installProductAttributeTable()
|
||||
{
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_product_attribute`');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_product_attribute`');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'layered_product_attribute` (
|
||||
`id_attribute` int(10) unsigned NOT NULL,
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
@@ -222,7 +222,7 @@ class BlockLayered extends Module
|
||||
else
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_product_attribute WHERE id_product = '.(int)$id_product);
|
||||
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'layered_product_attribute` (`id_attribute`, `id_product`, `id_attribute_group`)
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'layered_product_attribute` (`id_attribute`, `id_product`, `id_attribute_group`)
|
||||
SELECT pac.id_attribute, pa.id_product, ag.id_attribute_group
|
||||
FROM '._DB_PREFIX_.'product_attribute pa
|
||||
INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute
|
||||
@@ -242,7 +242,7 @@ class BlockLayered extends Module
|
||||
Db::getInstance()->execute('TRUNCATE '._DB_PREFIX_.'layered_friendly_url');
|
||||
|
||||
$attributeValuesByLang = array();
|
||||
$filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT lc.*, id_lang, name, link_rewrite, cl.id_category
|
||||
$filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT lc.*, id_lang, name, link_rewrite, cl.id_category
|
||||
FROM '._DB_PREFIX_.'layered_category lc
|
||||
INNER JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = lc.id_category AND lc.id_category <> 1 )
|
||||
GROUP BY type, id_value, id_lang');
|
||||
@@ -253,7 +253,7 @@ class BlockLayered extends Module
|
||||
switch ($filter['type'])
|
||||
{
|
||||
case 'id_attribute_group':
|
||||
$attributes = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$attributes = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT agl.public_name name, a.id_attribute_group id_name, al.name value, a.id_attribute id_value, al.id_lang,
|
||||
liagl.url_name name_url_name, lial.url_name value_url_name
|
||||
FROM '._DB_PREFIX_.'attribute_group ag
|
||||
@@ -284,7 +284,7 @@ class BlockLayered extends Module
|
||||
break;
|
||||
|
||||
case 'id_feature':
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT fl.name name, fl.id_feature id_name, fvl.id_feature_value id_value, fvl.value value, fl.id_lang, fl.id_lang,
|
||||
lifl.url_name name_url_name, lifvl.url_name value_url_name
|
||||
FROM '._DB_PREFIX_.'feature_lang fl
|
||||
@@ -314,7 +314,7 @@ class BlockLayered extends Module
|
||||
break;
|
||||
|
||||
case 'category':
|
||||
$categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT cl.name, cl.id_lang, c.id_category
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
INNER JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category)
|
||||
@@ -332,7 +332,7 @@ class BlockLayered extends Module
|
||||
break;
|
||||
|
||||
case 'manufacturer':
|
||||
$manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT m.name as name,l.id_lang as id_lang, id_manufacturer
|
||||
FROM '._DB_PREFIX_.'manufacturer m , '._DB_PREFIX_.'lang l
|
||||
WHERE l.id_lang = '.(int)$filter['id_lang'].' ');
|
||||
@@ -474,15 +474,15 @@ class BlockLayered extends Module
|
||||
if (!$params['id_feature'] || Tools::getValue('layered_indexable') === false)
|
||||
return;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']);
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature VALUES ('.(int)$params['id_feature'].', '.(int)Tools::getValue('layered_indexable').')');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']);
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature VALUES ('.(int)$params['id_feature'].', '.(int)Tools::getValue('layered_indexable').')');
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_lang_value WHERE id_feature = '.(int)$params['id_feature']); // don't care about the id_lang
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_lang_value WHERE id_feature = '.(int)$params['id_feature']); // don't care about the id_lang
|
||||
foreach (Language::getLanguages(false) as $language)
|
||||
{
|
||||
// Data are validated by method "hookPostProcessFeature"
|
||||
$id_lang = (int)$language['id_lang'];
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_lang_value
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_lang_value
|
||||
VALUES ('.(int)$params['id_feature'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\',
|
||||
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
|
||||
}
|
||||
@@ -493,12 +493,12 @@ class BlockLayered extends Module
|
||||
if (!$params['id_feature_value'])
|
||||
return;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']); // don't care about the id_lang
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']); // don't care about the id_lang
|
||||
foreach (Language::getLanguages(false) as $language)
|
||||
{
|
||||
// Data are validated by method "hookPostProcessFeatureValue"
|
||||
$id_lang = (int)$language['id_lang'];
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_value_lang_value
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_value_lang_value
|
||||
VALUES ('.(int)$params['id_feature_value'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\',
|
||||
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
|
||||
}
|
||||
@@ -508,7 +508,7 @@ class BlockLayered extends Module
|
||||
{
|
||||
if (!$params['id_feature_value'])
|
||||
return;
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']);
|
||||
}
|
||||
|
||||
public function hookPostProcessFeatureValue($params)
|
||||
@@ -522,7 +522,7 @@ class BlockLayered extends Module
|
||||
$default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$langValue = array();
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
|
||||
'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value
|
||||
WHERE id_feature_value = '.(int)$params['id_feature_value']);
|
||||
if ($result)
|
||||
@@ -565,12 +565,12 @@ class BlockLayered extends Module
|
||||
if (!$params['id_attribute'])
|
||||
return;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']); // don't care about the id_lang
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']); // don't care about the id_lang
|
||||
foreach (Language::getLanguages(false) as $language)
|
||||
{
|
||||
// Data are validated by method "hookPostProcessAttribute"
|
||||
$id_lang = (int)$language['id_lang'];
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_lang_value
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_lang_value
|
||||
VALUES ('.(int)$params['id_attribute'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\',
|
||||
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
|
||||
}
|
||||
@@ -580,7 +580,7 @@ class BlockLayered extends Module
|
||||
{
|
||||
if (!$params['id_attribute'])
|
||||
return;
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']);
|
||||
}
|
||||
|
||||
public function hookPostProcessAttribute($params)
|
||||
@@ -594,7 +594,7 @@ class BlockLayered extends Module
|
||||
$default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$langValue = array();
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
|
||||
'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value
|
||||
WHERE id_attribute = '.(int)$params['id_attribute']);
|
||||
if ($result)
|
||||
@@ -641,7 +641,7 @@ class BlockLayered extends Module
|
||||
{
|
||||
if (!$params['id_feature'])
|
||||
return;
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']);
|
||||
}
|
||||
|
||||
public function hookAfterSaveAttributeGroup($params)
|
||||
@@ -649,15 +649,15 @@ class BlockLayered extends Module
|
||||
if (!$params['id_attribute_group'] || Tools::getValue('layered_indexable') === false)
|
||||
return;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group VALUES ('.(int)$params['id_attribute_group'].', '.(int)Tools::getValue('layered_indexable').')');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group VALUES ('.(int)$params['id_attribute_group'].', '.(int)Tools::getValue('layered_indexable').')');
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']); // don't care about the id_lang
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']); // don't care about the id_lang
|
||||
foreach (Language::getLanguages(false) as $language)
|
||||
{
|
||||
// Data are validated by method "hookPostProcessAttributeGroup"
|
||||
$id_lang = (int)$language['id_lang'];
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value
|
||||
VALUES ('.(int)$params['id_attribute_group'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\',
|
||||
\''.pSQL(Tools::safeOutput(Tools::getValue('meta_title_'.$id_lang), true)).'\')');
|
||||
}
|
||||
@@ -689,8 +689,8 @@ class BlockLayered extends Module
|
||||
if (!$params['id_attribute_group'])
|
||||
return;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
}
|
||||
|
||||
public function hookAttributeGroupForm($params)
|
||||
@@ -701,7 +701,7 @@ class BlockLayered extends Module
|
||||
WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
$langValue = array();
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
|
||||
'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value
|
||||
WHERE id_attribute_group = '.(int)$params['id_attribute_group']);
|
||||
if ($result)
|
||||
@@ -760,7 +760,7 @@ class BlockLayered extends Module
|
||||
$indexable = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT indexable FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']);
|
||||
$langValue = array();
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
|
||||
'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_feature_lang_value
|
||||
WHERE id_feature = '.(int)$params['id_feature']);
|
||||
if ($result)
|
||||
@@ -900,7 +900,7 @@ class BlockLayered extends Module
|
||||
WHERE `active` = 1 AND psi.id_product is null
|
||||
ORDER by id_product LIMIT 0,'.(int)$length;
|
||||
|
||||
foreach (Db::getInstance()->ExecuteS($query) as $product)
|
||||
foreach (Db::getInstance()->executeS($query) as $product)
|
||||
self::indexProductPrices((int)$product['id_product'], ($smart && $full));
|
||||
|
||||
return (int)($cursor + $length);
|
||||
@@ -912,7 +912,7 @@ class BlockLayered extends Module
|
||||
|
||||
if (is_null($groups))
|
||||
{
|
||||
$groups = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT id_group FROM `'._DB_PREFIX_.'group_reduction`');
|
||||
$groups = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT id_group FROM `'._DB_PREFIX_.'group_reduction`');
|
||||
if(!$groups)
|
||||
$groups = array();
|
||||
}
|
||||
@@ -936,7 +936,7 @@ class BlockLayered extends Module
|
||||
WHERE id_product = '.(int)$idProduct.'
|
||||
GROUP BY id_product');
|
||||
|
||||
$productMinPrices = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$productMinPrices = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT id_shop, id_currency, id_country, id_group, from_quantity
|
||||
FROM `'._DB_PREFIX_.'specific_price`
|
||||
WHERE id_product = '.(int)$idProduct);
|
||||
@@ -1004,7 +1004,7 @@ class BlockLayered extends Module
|
||||
foreach ($currencyList as $currency)
|
||||
$values[] = '('.(int)$idProduct.', '.(int)$currency['id_currency'].', '.(int)$minPrice[$currency['id_currency']].', '.(int)$maxPrice[$currency['id_currency']].')';
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'layered_price_index` (id_product, id_currency, price_min, price_max)
|
||||
VALUES '.implode(',', $values).'
|
||||
ON DUPLICATE KEY UPDATE id_product = id_product # avoid duplicate keys');
|
||||
@@ -1088,7 +1088,7 @@ class BlockLayered extends Module
|
||||
|
||||
public function hookCategoryDeletion($params)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$params['category']->id);
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$params['category']->id);
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
@@ -1110,12 +1110,12 @@ class BlockLayered extends Module
|
||||
else
|
||||
{
|
||||
if (isset($_POST['id_layered_filter']) && $_POST['id_layered_filter'])
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)Tools::getValue('id_layered_filter'));
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)Tools::getValue('id_layered_filter'));
|
||||
|
||||
if (Tools::getValue('scope') == 1)
|
||||
{
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE '._DB_PREFIX_.'layered_filter');
|
||||
$categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT id_category FROM '._DB_PREFIX_.'category');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'layered_filter');
|
||||
$categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT id_category FROM '._DB_PREFIX_.'category');
|
||||
foreach ($categories as $category)
|
||||
$_POST['categoryBox'][] = (int)$category['id_category'];
|
||||
}
|
||||
@@ -1127,7 +1127,7 @@ class BlockLayered extends Module
|
||||
foreach ($_POST['categoryBox'] as &$categoryBoxTmp)
|
||||
$categoryBoxTmp = (int)$categoryBoxTmp;
|
||||
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_category WHERE id_category IN ('.implode(',', array_map('intval', $_POST['categoryBox'])).')');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_category WHERE id_category IN ('.implode(',', array_map('intval', $_POST['categoryBox'])).')');
|
||||
|
||||
$filterValues = array();
|
||||
foreach ($_POST['categoryBox'] as $idc)
|
||||
@@ -1161,7 +1161,7 @@ class BlockLayered extends Module
|
||||
}
|
||||
}
|
||||
|
||||
Db::getInstance()->Execute(rtrim($sqlToInsert, ','));
|
||||
Db::getInstance()->execute(rtrim($sqlToInsert, ','));
|
||||
|
||||
$valuesToInsert = array(
|
||||
'name' => pSQL(Tools::getValue('layered_tpl_name')),
|
||||
@@ -1198,7 +1198,7 @@ class BlockLayered extends Module
|
||||
|
||||
if ($layeredValues)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)$_GET['id_layered_filter'].' LIMIT 1');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)$_GET['id_layered_filter'].' LIMIT 1');
|
||||
|
||||
$html .= '
|
||||
<div class="conf">
|
||||
@@ -1236,7 +1236,7 @@ class BlockLayered extends Module
|
||||
</script>';
|
||||
|
||||
$categoryList = array();
|
||||
foreach(Db::getInstance()->ExecuteS('SELECT id_category FROM `'._DB_PREFIX_.'category`') as $category)
|
||||
foreach(Db::getInstance()->executeS('SELECT id_category FROM `'._DB_PREFIX_.'category`') as $category)
|
||||
if($category['id_category'] != 1)
|
||||
$categoryList[] = $category['id_category'];
|
||||
|
||||
@@ -1389,7 +1389,7 @@ class BlockLayered extends Module
|
||||
<fieldset class="width4">
|
||||
<legend><img src="../img/admin/cog.gif" alt="" />'.$this->l('Existing filters templates').'</legend>';
|
||||
|
||||
$filtersTemplates = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT * FROM '._DB_PREFIX_.'layered_filter ORDER BY date_add DESC');
|
||||
$filtersTemplates = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter ORDER BY date_add DESC');
|
||||
if (count($filtersTemplates))
|
||||
{
|
||||
$html .= '<p>'.count($filtersTemplates).' '.$this->l('filters templates are configured:').'</p>
|
||||
@@ -1942,14 +1942,14 @@ class BlockLayered extends Module
|
||||
AND psi.`id_currency` = '.(int)$idCurrency;
|
||||
}
|
||||
|
||||
$allProductsOut = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$allProductsOut = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT p.`id_product` id_product
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.$priceFilterQueryOut.'
|
||||
'.$queryFiltersFrom.'
|
||||
WHERE 1 '.$queryFiltersWhere.' GROUP BY id_product', false);
|
||||
|
||||
$allProductsIn = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$allProductsIn = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT p.`id_product` id_product
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.$priceFilterQueryIn.'
|
||||
@@ -1976,7 +1976,7 @@ class BlockLayered extends Module
|
||||
else
|
||||
{
|
||||
$n = (int)Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'));
|
||||
$this->products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$this->products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT p.id_product, p.on_sale, p.out_of_stock, p.available_for_order, p.quantity, p.minimal_quantity, p.id_category_default, p.customizable, p.show_price, p.`weight`,
|
||||
p.ean13, pl.available_later, pl.description_short, pl.link_rewrite, pl.name, i.id_image, il.legend, m.name manufacturer_name, p.condition, p.id_manufacturer,
|
||||
DATEDIFF(p.`date_add`,
|
||||
@@ -2011,7 +2011,7 @@ class BlockLayered extends Module
|
||||
$parent = new Category((int)$id_parent);
|
||||
|
||||
/* Get the filters for the current category */
|
||||
$filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT * FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$id_parent.'
|
||||
$filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$id_parent.'
|
||||
GROUP BY `type`, id_value ORDER BY position ASC');
|
||||
// Remove all empty selected filters
|
||||
foreach ($selectedFilters as $key => $value)
|
||||
@@ -2146,7 +2146,7 @@ class BlockLayered extends Module
|
||||
|
||||
$products = false;
|
||||
if (!empty($sqlQuery['from']))
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sqlQuery['select']."\n".$sqlQuery['from']."\n".$sqlQuery['join']."\n".$sqlQuery['where']."\n".$sqlQuery['group']);
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sqlQuery['select']."\n".$sqlQuery['from']."\n".$sqlQuery['join']."\n".$sqlQuery['where']."\n".$sqlQuery['group']);
|
||||
|
||||
foreach ($filters as $filterTmp)
|
||||
{
|
||||
@@ -2336,7 +2336,7 @@ class BlockLayered extends Module
|
||||
$nonIndexable = array();
|
||||
|
||||
// Get all non indexable attribute groups
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT public_name
|
||||
FROM `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_group` liag
|
||||
@@ -2346,7 +2346,7 @@ class BlockLayered extends Module
|
||||
$nonIndexable[] = Tools::link_rewrite($attribute['public_name']);
|
||||
|
||||
// Get all non indexable features
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT name
|
||||
FROM `'._DB_PREFIX_.'feature_lang` fl
|
||||
LEFT JOIN `'._DB_PREFIX_.'layered_indexable_feature` lif
|
||||
@@ -2619,7 +2619,7 @@ class BlockLayered extends Module
|
||||
foreach ($categoryBox as &$value)
|
||||
$value = (int)$value;
|
||||
|
||||
$attributeGroups = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$attributeGroups = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT ag.id_attribute_group, ag.is_color_group, agl.name, COUNT(DISTINCT(a.id_attribute)) n
|
||||
FROM '._DB_PREFIX_.'attribute_group ag
|
||||
LEFT JOIN '._DB_PREFIX_.'attribute_group_lang agl ON (agl.id_attribute_group = ag.id_attribute_group)
|
||||
@@ -2632,7 +2632,7 @@ class BlockLayered extends Module
|
||||
(count($categoryBox) ? ' AND cp.id_category IN ('.implode(',', $categoryBox).')' : '').'
|
||||
GROUP BY ag.id_attribute_group');
|
||||
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT fl.id_feature, fl.name, COUNT(DISTINCT(fv.id_feature_value)) n
|
||||
FROM '._DB_PREFIX_.'feature_lang fl
|
||||
LEFT JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature = fl.id_feature)
|
||||
@@ -2834,8 +2834,8 @@ class BlockLayered extends Module
|
||||
@ini_set('memory_limit','128M');
|
||||
|
||||
/* Delete and re-create the layered categories table */
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category');
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_category` (
|
||||
`id_layered_category` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_category` INT(10) UNSIGNED NOT NULL,
|
||||
@@ -2846,7 +2846,7 @@ class BlockLayered extends Module
|
||||
KEY `id_category` (`id_category`,`type`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter` (
|
||||
`id_layered_filter` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`name` VARCHAR(64) NOT NULL,
|
||||
@@ -2868,7 +2868,7 @@ class BlockLayered extends Module
|
||||
$nCategories = array();
|
||||
$doneCategories = array();
|
||||
|
||||
$attributeGroups = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$attributeGroups = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT a.id_attribute, a.id_attribute_group
|
||||
FROM '._DB_PREFIX_.'attribute a
|
||||
LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.id_attribute = a.id_attribute)
|
||||
@@ -2883,7 +2883,7 @@ class BlockLayered extends Module
|
||||
while ($row = $db->nextRow($attributeGroups))
|
||||
$attributeGroupsById[(int)$row['id_attribute']] = (int)$row['id_attribute_group'];
|
||||
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$features = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT fv.id_feature_value, fv.id_feature
|
||||
FROM '._DB_PREFIX_.'feature_value fv
|
||||
LEFT JOIN '._DB_PREFIX_.'feature_product fp ON (fp.id_feature_value = fv.id_feature_value)
|
||||
@@ -2897,7 +2897,7 @@ class BlockLayered extends Module
|
||||
while ($row = $db->nextRow($features))
|
||||
$featuresById[(int)$row['id_feature_value']] = (int)$row['id_feature'];
|
||||
|
||||
$result = $db->ExecuteS('
|
||||
$result = $db->executeS('
|
||||
SELECT p.id_product, GROUP_CONCAT(DISTINCT fv.id_feature_value) features, GROUP_CONCAT(DISTINCT cp.id_category) categories, GROUP_CONCAT(DISTINCT pac.id_attribute) attributes
|
||||
FROM '._DB_PREFIX_.'product p
|
||||
LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product)
|
||||
@@ -2978,7 +2978,7 @@ class BlockLayered extends Module
|
||||
}
|
||||
}
|
||||
if ($toInsert)
|
||||
Db::getInstance()->Execute(rtrim($queryCategory, ','));
|
||||
Db::getInstance()->execute(rtrim($queryCategory, ','));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,14 +52,14 @@ class BlockLink extends Module
|
||||
{
|
||||
if (!parent::install() OR
|
||||
!$this->registerHook('leftColumn') OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink (
|
||||
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`new_window` TINYINT(1) NOT NULL,
|
||||
PRIMARY KEY(`id_blocklink`))
|
||||
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink_lang (
|
||||
`id_blocklink` int(2) NOT NULL,
|
||||
`id_lang` int(2) NOT NULL,
|
||||
@@ -74,8 +74,8 @@ class BlockLink extends Module
|
||||
public function uninstall()
|
||||
{
|
||||
if (!parent::uninstall() OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR
|
||||
!Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR
|
||||
!Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_TITLE') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_URL'))
|
||||
return false;
|
||||
@@ -106,7 +106,7 @@ class BlockLink extends Module
|
||||
{
|
||||
$result = array();
|
||||
/* Get id and url */
|
||||
if (!$links = Db::getInstance()->ExecuteS('SELECT `id_blocklink`, `url`, `new_window` FROM '._DB_PREFIX_.'blocklink'.((int)(Configuration::get('PS_BLOCKLINK_ORDERWAY')) == 1 ? ' ORDER BY `id_blocklink` DESC' : '')))
|
||||
if (!$links = Db::getInstance()->executeS('SELECT `id_blocklink`, `url`, `new_window` FROM '._DB_PREFIX_.'blocklink'.((int)(Configuration::get('PS_BLOCKLINK_ORDERWAY')) == 1 ? ' ORDER BY `id_blocklink` DESC' : '')))
|
||||
return false;
|
||||
$i = 0;
|
||||
foreach ($links AS $link)
|
||||
@@ -115,7 +115,7 @@ class BlockLink extends Module
|
||||
$result[$i]['url'] = $link['url'];
|
||||
$result[$i]['newWindow'] = $link['new_window'];
|
||||
/* Get multilingual text */
|
||||
if (!$texts = Db::getInstance()->ExecuteS('SELECT `id_lang`, `text` FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink`='.(int)($link['id_blocklink'])))
|
||||
if (!$texts = Db::getInstance()->executeS('SELECT `id_lang`, `text` FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink`='.(int)($link['id_blocklink'])))
|
||||
return false;
|
||||
foreach ($texts AS $text)
|
||||
$result[$i]['text_'.$text['id_lang']] = $text['text'];
|
||||
@@ -127,7 +127,7 @@ class BlockLink extends Module
|
||||
public function addLink()
|
||||
{
|
||||
/* Url registration */
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink VALUES (NULL, \''.pSQL($_POST['url']).'\', '.((isset($_POST['newWindow']) AND $_POST['newWindow']) == 'on' ? 1 : 0).')') OR !$lastId = Db::getInstance()->Insert_ID())
|
||||
if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink VALUES (NULL, \''.pSQL($_POST['url']).'\', '.((isset($_POST['newWindow']) AND $_POST['newWindow']) == 'on' ? 1 : 0).')') OR !$lastId = Db::getInstance()->Insert_ID())
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
@@ -137,11 +137,11 @@ class BlockLink extends Module
|
||||
foreach ($languages AS $language)
|
||||
if (!empty($_POST['text_'.$language['id_lang']]))
|
||||
{
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
|
||||
if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -149,30 +149,30 @@ class BlockLink extends Module
|
||||
public function updateLink()
|
||||
{
|
||||
/* Url registration */
|
||||
if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'blocklink SET `url`=\''.pSQL($_POST['url']).'\', `new_window`='.(isset($_POST['newWindow']) ? 1 : 0).' WHERE `id_blocklink`='.(int)($_POST['id'])))
|
||||
if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'blocklink SET `url`=\''.pSQL($_POST['url']).'\', `new_window`='.(isset($_POST['newWindow']) ? 1 : 0).' WHERE `id_blocklink`='.(int)($_POST['id'])))
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
if (!$languages)
|
||||
return false;
|
||||
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)($_POST['id'])))
|
||||
if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)($_POST['id'])))
|
||||
return false ;
|
||||
foreach ($languages AS $language)
|
||||
if (!empty($_POST['text_'.$language['id_lang']]))
|
||||
{
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
|
||||
if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function deleteLink()
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink WHERE `id_blocklink`='.(int)($_GET['id']));
|
||||
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink WHERE `id_blocklink`='.(int)($_GET['id']));
|
||||
}
|
||||
|
||||
public function updateTitle()
|
||||
|
||||
@@ -76,12 +76,12 @@ class BlockMyAccount extends Module
|
||||
|
||||
private function addMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
return Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
|
||||
}
|
||||
|
||||
private function removeMyAccountBlockHook()
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlock\'');
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlock\'');
|
||||
}
|
||||
function hookHeader($params)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ class Blocknewsletter extends Module
|
||||
|
||||
Configuration::updateValue('NW_SALT', Tools::passwdGen(16));
|
||||
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'newsletter (
|
||||
`id` int(6) NOT NULL AUTO_INCREMENT,
|
||||
`id_shop` INTEGER UNSIGNED NOT NULL DEFAULT \'1\',
|
||||
@@ -85,7 +85,7 @@ class Blocknewsletter extends Module
|
||||
{
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
return Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'newsletter');
|
||||
return Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter');
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
@@ -199,13 +199,13 @@ class Blocknewsletter extends Module
|
||||
return $this->error = $this->l('E-mail address not registered');
|
||||
else if ($register_status == self::GUEST_REGISTERED)
|
||||
{
|
||||
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->getID(true)))
|
||||
if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->getID(true)))
|
||||
return $this->error = $this->l('Error during unsubscription');
|
||||
return $this->valid = $this->l('Unsubscription successful');
|
||||
}
|
||||
else if ($register_status == self::CUSTOMER_REGISTERED)
|
||||
{
|
||||
if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->getID(true)))
|
||||
if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->getID(true)))
|
||||
return $this->error = $this->l('Error during unsubscription');
|
||||
return $this->valid = $this->l('Unsubscription successful');
|
||||
}
|
||||
@@ -299,7 +299,7 @@ class Blocknewsletter extends Module
|
||||
WHERE `email` = \''.pSQL($email).'\'
|
||||
AND id_shop = '.$this->context->shop->getID(true);
|
||||
|
||||
return Db::getInstance()->Execute($sql);
|
||||
return Db::getInstance()->execute($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -327,13 +327,13 @@ class Blocknewsletter extends Module
|
||||
'.(int)$active.'
|
||||
)';
|
||||
|
||||
return Db::getInstance()->Execute($sql);
|
||||
return Db::getInstance()->execute($sql);
|
||||
}
|
||||
|
||||
|
||||
public function activateGuest($email)
|
||||
{
|
||||
return Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'newsletter`
|
||||
return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'newsletter`
|
||||
SET `active` = 1
|
||||
WHERE `email` = \''.pSQL($email).'\''
|
||||
);
|
||||
|
||||
@@ -52,7 +52,7 @@ class blockreinsurance extends Module
|
||||
|
||||
public function installDB()
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` (
|
||||
`id_contactinfos` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`filename` VARCHAR(100) NOT NULL,
|
||||
@@ -69,7 +69,7 @@ class blockreinsurance extends Module
|
||||
|
||||
public function uninstallDB()
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`');
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class blockreinsurance extends Module
|
||||
return false;
|
||||
unlink($tmpName);
|
||||
}
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`)
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`)
|
||||
VALUES ("'.((isset($filename[0]) AND $filename[0] != '') ? pSQL($filename[0]) : '').
|
||||
'", "'.((isset($_POST['info'.$i.'_text']) AND $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")');
|
||||
}
|
||||
@@ -112,12 +112,12 @@ class blockreinsurance extends Module
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'reinsurance`');
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'reinsurance`');
|
||||
}
|
||||
|
||||
public function getAllFromDB()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'reinsurance`');
|
||||
return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'reinsurance`');
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
|
||||
@@ -28,13 +28,13 @@ class blocktopmenu extends Module
|
||||
|
||||
public function installDb()
|
||||
{
|
||||
Db::getInstance()->ExecuteS('
|
||||
Db::getInstance()->executeS('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
|
||||
`id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
|
||||
`new_window` TINYINT( 1 ) NOT NULL,
|
||||
`link` VARCHAR( 128 ) NOT NULL
|
||||
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
|
||||
Db::getInstance()->ExecuteS('
|
||||
Db::getInstance()->executeS('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
|
||||
`id_link` INT NOT NULL ,
|
||||
`id_lang` INT NOT NULL ,
|
||||
@@ -56,8 +56,8 @@ class blocktopmenu extends Module
|
||||
|
||||
private function uninstallDb()
|
||||
{
|
||||
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`');
|
||||
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`');
|
||||
Db::getInstance()->executeS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`');
|
||||
Db::getInstance()->executeS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ class MenuTopLinks
|
||||
{
|
||||
public static function gets($id_lang, $id_link = null)
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT l.id_link, l.new_window, l.link, ll.label
|
||||
FROM '._DB_PREFIX_.'linksmenutop l
|
||||
LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = "'.$id_lang.'")
|
||||
|
||||
@@ -101,7 +101,7 @@ class BlockViewed extends Module
|
||||
$defaultCover = Language::getIsoById($params['cookie']->id_lang).'-default';
|
||||
|
||||
$productIds = implode(',', $productsViewed);
|
||||
$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT i.id_image, p.id_product, il.legend, p.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite
|
||||
FROM '._DB_PREFIX_.'product p
|
||||
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.$this->context->shop->sqlLang('pl').')
|
||||
|
||||
@@ -68,8 +68,8 @@ class WishList extends ObjectModel
|
||||
|
||||
public function delete()
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'wishlist_email` WHERE `id_wishlist` = '.(int)($this->id));
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'wishlist_product` WHERE `id_wishlist` = '.(int)($this->id));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_email` WHERE `id_wishlist` = '.(int)($this->id));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_product` WHERE `id_wishlist` = '.(int)($this->id));
|
||||
if (isset($this->context->cookie->id_wishlist))
|
||||
unset($this->context->cookie->id_wishlist);
|
||||
|
||||
@@ -91,7 +91,7 @@ class WishList extends ObjectModel
|
||||
WHERE `id_wishlist` = '.(int)($id_wishlist));
|
||||
if ($result == false OR !sizeof($result) OR empty($result) === true)
|
||||
return (false);
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist` SET
|
||||
`counter` = '.(int)($result['counter'] + 1).'
|
||||
WHERE `id_wishlist` = '.(int)($id_wishlist)));
|
||||
@@ -159,7 +159,7 @@ class WishList extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_customer))
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT w.`id_wishlist`, w.`name`, w.`token`, w.`date_add`, w.`date_upd`, w.`counter`
|
||||
FROM `'._DB_PREFIX_.'wishlist` w
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
@@ -168,7 +168,7 @@ class WishList extends ObjectModel
|
||||
|
||||
public static function refreshWishList($id_wishlist)
|
||||
{
|
||||
$old_carts = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$old_carts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT wp.id_product, wp.id_product_attribute, wpc.id_cart, UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(wpc.date_add) AS timecart
|
||||
FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc
|
||||
JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product)
|
||||
@@ -180,12 +180,12 @@ class WishList extends ObjectModel
|
||||
|
||||
if(isset($old_carts) AND $old_carts != false)
|
||||
foreach ($old_carts AS $old_cart)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'cart_product`
|
||||
WHERE id_cart='.(int)($old_cart['id_cart']).' AND id_product='.(int)($old_cart['id_product']).' AND id_product_attribute='.(int)($old_cart['id_product_attribute'])
|
||||
);
|
||||
|
||||
$freshwish = Db::getInstance()->ExecuteS('
|
||||
$freshwish = Db::getInstance()->executeS('
|
||||
SELECT wpc.id_cart, wpc.id_wishlist_product
|
||||
FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc
|
||||
JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wpc.id_wishlist_product = wp.id_wishlist_product)
|
||||
@@ -193,7 +193,7 @@ class WishList extends ObjectModel
|
||||
LEFT JOIN `'._DB_PREFIX_.'cart_product` cp ON (cp.id_cart = wpc.id_cart AND cp.id_product = wp.id_product AND cp.id_product_attribute = wp.id_product_attribute)
|
||||
WHERE (wp.id_wishlist = '.(int)($id_wishlist).' AND ((cp.id_product IS NULL AND cp.id_product_attribute IS NULL)))
|
||||
');
|
||||
$res = Db::getInstance()->ExecuteS('
|
||||
$res = Db::getInstance()->executeS('
|
||||
SELECT wp.id_wishlist_product, cp.quantity AS cart_quantity, wpc.quantity AS wish_quantity, wpc.id_cart
|
||||
FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc
|
||||
JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product)
|
||||
@@ -206,12 +206,12 @@ class WishList extends ObjectModel
|
||||
foreach ($res AS $refresh)
|
||||
if($refresh['wish_quantity'] > $refresh['cart_quantity'])
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product`
|
||||
SET `quantity`= `quantity` + '.((int)($refresh['wish_quantity']) - (int)($refresh['cart_quantity'])).'
|
||||
WHERE id_wishlist_product='.(int)($refresh['id_wishlist_product'])
|
||||
);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
SET `quantity`='.(int)($refresh['cart_quantity']).'
|
||||
WHERE id_wishlist_product='.(int)($refresh['id_wishlist_product']).' AND id_cart='.(int)($refresh['id_cart'])
|
||||
@@ -220,7 +220,7 @@ class WishList extends ObjectModel
|
||||
if(isset($freshwish) AND $freshwish != false)
|
||||
foreach ($freshwish AS $prodcustomer)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product` SET `quantity`=`quantity` +
|
||||
(
|
||||
SELECT `quantity` FROM `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
@@ -228,7 +228,7 @@ class WishList extends ObjectModel
|
||||
)
|
||||
WHERE `id_wishlist_product`='.(int)($prodcustomer['id_wishlist_product']).' AND `id_wishlist`='.(int)($id_wishlist)
|
||||
);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
WHERE `id_wishlist_product`='.(int)($prodcustomer['id_wishlist_product']).' AND `id_cart`='.(int)($prodcustomer['id_cart'])
|
||||
);
|
||||
@@ -246,7 +246,7 @@ class WishList extends ObjectModel
|
||||
!Validate::isUnsignedId($id_lang) OR
|
||||
!Validate::isUnsignedId($id_wishlist))
|
||||
die (Tools::displayError());
|
||||
$products = Db::getInstance()->ExecuteS('
|
||||
$products = Db::getInstance()->executeS('
|
||||
SELECT wp.`id_product`, wp.`quantity`, p.`quantity` AS product_quantity, pl.`name`, wp.`id_product_attribute`, wp.`priority`, pl.link_rewrite, cl.link_rewrite AS category_rewrite
|
||||
FROM `'._DB_PREFIX_.'wishlist_product` wp
|
||||
JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = wp.`id_product`
|
||||
@@ -265,7 +265,7 @@ class WishList extends ObjectModel
|
||||
if (isset($products[$i]['id_product_attribute']) AND
|
||||
Validate::isUnsignedInt($products[$i]['id_product_attribute']))
|
||||
{
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT al.`name` AS attribute_name, pa.`quantity` AS "attribute_quantity"
|
||||
FROM `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
@@ -297,7 +297,7 @@ class WishList extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_customer))
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT SUM(wp.`quantity`) AS nbProducts, wp.`id_wishlist`
|
||||
FROM `'._DB_PREFIX_.'wishlist_product` wp
|
||||
INNER JOIN `'._DB_PREFIX_.'wishlist` w ON (w.`id_wishlist` = wp.`id_wishlist`)
|
||||
@@ -331,7 +331,7 @@ class WishList extends ObjectModel
|
||||
if (($result['quantity'] + $quantity) <= 0)
|
||||
return (WishList::removeProduct($id_wishlist, $id_customer, $id_product, $id_product_attribute));
|
||||
else
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product` SET
|
||||
`quantity` = '.(int)($quantity + $result['quantity']).'
|
||||
WHERE `id_wishlist` = '.(int)($id_wishlist).'
|
||||
@@ -339,7 +339,7 @@ class WishList extends ObjectModel
|
||||
AND `id_product_attribute` = '.(int)($id_product_attribute)));
|
||||
}
|
||||
else
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'wishlist_product` (`id_wishlist`, `id_product`, `id_product_attribute`, `quantity`, `priority`) VALUES(
|
||||
'.(int)($id_wishlist).',
|
||||
'.(int)($id_product).',
|
||||
@@ -360,7 +360,7 @@ class WishList extends ObjectModel
|
||||
!Validate::isUnsignedId($quantity) OR
|
||||
$priority < 0 OR $priority > 2)
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product` SET
|
||||
`priority` = '.(int)($priority).',
|
||||
`quantity` = '.(int)($quantity).'
|
||||
@@ -392,11 +392,11 @@ class WishList extends ObjectModel
|
||||
$result['id_wishlist'] != $id_wishlist)
|
||||
return (false);
|
||||
// Delete product in wishlist_product_cart
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
WHERE `id_wishlist_product` = '.(int)($result['id_wishlist_product'])
|
||||
);
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'wishlist_product`
|
||||
WHERE `id_wishlist` = '.(int)($id_wishlist).'
|
||||
AND `id_product` = '.(int)($id_product).'
|
||||
@@ -414,7 +414,7 @@ class WishList extends ObjectModel
|
||||
|
||||
if (!Validate::isUnsignedId($id_wishlist))
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT wp.`id_product`, wp.`id_product_attribute`, wpc.`quantity`, wpc.`date_add`, cu.`lastname`, cu.`firstname`
|
||||
FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc
|
||||
JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product)
|
||||
@@ -446,21 +446,21 @@ class WishList extends ObjectModel
|
||||
$quantity > $result['quantity'])
|
||||
return (false);
|
||||
|
||||
Db::getInstance()->ExecuteS('
|
||||
Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
WHERE `id_wishlist_product`='.(int)($result['id_wishlist_product']).' AND `id_cart`='.(int)($id_cart)
|
||||
);
|
||||
|
||||
if (Db::getInstance()->NumRows() > 0)
|
||||
$result2= Db::getInstance()->Execute('
|
||||
$result2= Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
SET `quantity`=`quantity` + '.(int)($quantity).'
|
||||
WHERE `id_wishlist_product`='.(int)($result['id_wishlist_product']).' AND `id_cart`='.(int)($id_cart)
|
||||
);
|
||||
|
||||
else
|
||||
$result2 = Db::getInstance()->Execute('
|
||||
$result2 = Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'wishlist_product_cart`
|
||||
(`id_wishlist_product`, `id_cart`, `quantity`, `date_add`) VALUES(
|
||||
'.(int)($result['id_wishlist_product']).',
|
||||
@@ -470,7 +470,7 @@ class WishList extends ObjectModel
|
||||
|
||||
if ($result2 === false)
|
||||
return (false);
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'wishlist_product` SET
|
||||
`quantity` = '.(int)($result['quantity'] - $quantity).'
|
||||
WHERE `id_wishlist` = '.(int)($id_wishlist).'
|
||||
@@ -487,7 +487,7 @@ class WishList extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_wishlist) OR empty($email) OR !Validate::isEmail($email))
|
||||
return false;
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'wishlist_email` (`id_wishlist`, `email`, `date_add`) VALUES(
|
||||
'.(int)($id_wishlist).',
|
||||
\''.pSQL($email).'\',
|
||||
@@ -504,7 +504,7 @@ class WishList extends ObjectModel
|
||||
if (!Validate::isUnsignedId($id_wishlist) OR
|
||||
!Validate::isUnsignedId($id_customer))
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT we.`email`, we.`date_add`
|
||||
FROM `'._DB_PREFIX_.'wishlist_email` we
|
||||
INNER JOIN `'._DB_PREFIX_.'wishlist` w ON w.`id_wishlist` = we.`id_wishlist`
|
||||
|
||||
@@ -60,7 +60,7 @@ class BlockWishList extends Module
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
foreach ($sql AS $query)
|
||||
if($query)
|
||||
if(!Db::getInstance()->Execute(trim($query)))
|
||||
if(!Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
if (!parent::install() OR
|
||||
!$this->registerHook('rightColumn') OR
|
||||
@@ -79,10 +79,10 @@ class BlockWishList extends Module
|
||||
public function uninstall()
|
||||
{
|
||||
return (
|
||||
Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'wishlist') AND
|
||||
Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'wishlist_email') AND
|
||||
Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'wishlist_product') AND
|
||||
Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'wishlist_product_cart') AND
|
||||
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist') AND
|
||||
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_email') AND
|
||||
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_product') AND
|
||||
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_product_cart') AND
|
||||
parent::uninstall()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class CanadaPost extends CarrierModule
|
||||
// Install SQL
|
||||
include(dirname(__FILE__).'/sql-install.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
|
||||
// Install Carriers
|
||||
@@ -156,7 +156,7 @@ class CanadaPost extends CarrierModule
|
||||
// Uninstall SQL
|
||||
include(dirname(__FILE__).'/sql-uninstall.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
|
||||
// Uninstall Module
|
||||
@@ -172,7 +172,7 @@ class CanadaPost extends CarrierModule
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'cp_rate_service_code', array('active' => 0), 'UPDATE');
|
||||
|
||||
// Get all services availables
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach ($rateServiceList as $rateService)
|
||||
if (!$rateService['id_carrier'])
|
||||
{
|
||||
@@ -475,7 +475,7 @@ class CanadaPost extends CarrierModule
|
||||
<label>'.$this->l('State').' : </label>
|
||||
<div class="margin-form">';
|
||||
$id_country_current = 0;
|
||||
$statesList = Db::getInstance()->ExecuteS('
|
||||
$statesList = Db::getInstance()->executeS('
|
||||
SELECT `id_state`, `id_country`, `name`
|
||||
FROM `'._DB_PREFIX_.'state` WHERE `active` = 1
|
||||
ORDER BY `id_country`, `name` ASC');
|
||||
@@ -510,7 +510,7 @@ class CanadaPost extends CarrierModule
|
||||
</div>
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_cp_rate_service_code'].'" '.(($rateService['active'] == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].' '.($this->webserviceTest($rateService['code']) ? '('.$this->l('Available').')' : '('.$this->l('Not available').')').'<br />';
|
||||
$html .= '
|
||||
@@ -626,7 +626,7 @@ class CanadaPost extends CarrierModule
|
||||
|
||||
if (isset($category['id_category']))
|
||||
{
|
||||
$categories = Db::getInstance()->ExecuteS('
|
||||
$categories = Db::getInstance()->executeS('
|
||||
SELECT c.id_category, cl.name, cl.link_rewrite
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.$this->context->shop->sqlLang('cl').')
|
||||
@@ -694,7 +694,7 @@ class CanadaPost extends CarrierModule
|
||||
<tbody>';
|
||||
|
||||
// Loading config list
|
||||
$configCategoryList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_category` > 0');
|
||||
$configCategoryList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_category` > 0');
|
||||
if (!$configCategoryList)
|
||||
$html .= '<tr><td colspan="6">'.$this->l('There is no specific Canada Post configuration for categories at this point.').'</td></tr>';
|
||||
foreach ($configCategoryList as $k => $c)
|
||||
@@ -713,7 +713,7 @@ class CanadaPost extends CarrierModule
|
||||
|
||||
// Loading services attached to this config
|
||||
$services = '';
|
||||
$servicesTab = Db::getInstance()->ExecuteS('
|
||||
$servicesTab = Db::getInstance()->executeS('
|
||||
SELECT ursc.`service`
|
||||
FROM `'._DB_PREFIX_.'cp_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'cp_rate_service_code` ursc ON (ursc.`id_cp_rate_service_code` = urcs.`id_cp_rate_service_code`)
|
||||
@@ -770,7 +770,7 @@ class CanadaPost extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges', $configSelected['additional_charges'])).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
{
|
||||
$configServiceSelected = Db::getInstance()->getValue('SELECT `id_cp_rate_service_code` FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)(Tools::getValue('id_cp_rate_config')).' AND `id_cp_rate_service_code` = '.(int)($rateService['id_cp_rate_service_code']));
|
||||
@@ -797,7 +797,7 @@ class CanadaPost extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges')).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_cp_rate_service_code'].'" '.(($this->_isPostCheck($rateService['id_cp_rate_service_code']) == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].'<br />';
|
||||
$html .= '
|
||||
@@ -875,7 +875,7 @@ class CanadaPost extends CarrierModule
|
||||
'date_upd' => pSQL($date)
|
||||
);
|
||||
$result = Db::getInstance()->autoExecute(_DB_PREFIX_.'cp_rate_config', $updTab, 'UPDATE', '`id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
foreach ($services as $s)
|
||||
{
|
||||
$addTab = array('id_cp_rate_service_code' => pSQL($s), 'id_cp_rate_config' => (int)Tools::getValue('id_cp_rate_config'), 'date_add' => pSQL($date), 'date_upd' => pSQL($date));
|
||||
@@ -892,8 +892,8 @@ class CanadaPost extends CarrierModule
|
||||
// Delete Script
|
||||
if (Tools::getValue('action') == 'delete' && Tools::getValue('id_cp_rate_config'))
|
||||
{
|
||||
$result1 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result2 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result1 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result2 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
|
||||
// Display Results
|
||||
if ($result1)
|
||||
@@ -931,7 +931,7 @@ class CanadaPost extends CarrierModule
|
||||
<tbody>';
|
||||
|
||||
// Loading config list
|
||||
$configProductList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_product` > 0');
|
||||
$configProductList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_product` > 0');
|
||||
if (!$configProductList)
|
||||
$html .= '<tr><td colspan="6">'.$this->l('There is no specific Canada Post configuration for products at this point.').'</td></tr>';
|
||||
foreach ($configProductList as $k => $c)
|
||||
@@ -944,7 +944,7 @@ class CanadaPost extends CarrierModule
|
||||
|
||||
// Loading services attached to this config
|
||||
$services = '';
|
||||
$servicesTab = Db::getInstance()->ExecuteS('
|
||||
$servicesTab = Db::getInstance()->executeS('
|
||||
SELECT ursc.`service`
|
||||
FROM `'._DB_PREFIX_.'cp_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'cp_rate_service_code` ursc ON (ursc.`id_cp_rate_service_code` = urcs.`id_cp_rate_service_code`)
|
||||
@@ -993,7 +993,7 @@ class CanadaPost extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges', $configSelected['additional_charges'])).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
{
|
||||
$configServiceSelected = Db::getInstance()->getValue('SELECT `id_cp_rate_service_code` FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)(Tools::getValue('id_cp_rate_config')).' AND `id_cp_rate_service_code` = '.(int)($rateService['id_cp_rate_service_code']));
|
||||
@@ -1013,7 +1013,7 @@ class CanadaPost extends CarrierModule
|
||||
<div class="margin-form">
|
||||
<select name="id_product">
|
||||
<option value="0">'.$this->l('Select a product ...').'</option>';
|
||||
$productsList = Db::getInstance()->ExecuteS('
|
||||
$productsList = Db::getInstance()->executeS('
|
||||
SELECT pl.* FROM `'._DB_PREFIX_.'product` p
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id.$this->context->shop->sqlLang('pl').')
|
||||
WHERE p.`active` = 1
|
||||
@@ -1027,7 +1027,7 @@ class CanadaPost extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges')).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_cp_rate_service_code'].'" '.(($this->_isPostCheck($rateService['id_cp_rate_service_code']) == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].'<br />';
|
||||
$html .= '
|
||||
@@ -1105,7 +1105,7 @@ class CanadaPost extends CarrierModule
|
||||
'date_upd' => pSQL($date)
|
||||
);
|
||||
$result = Db::getInstance()->autoExecute(_DB_PREFIX_.'cp_rate_config', $updTab, 'UPDATE', '`id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
foreach ($services as $s)
|
||||
{
|
||||
$addTab = array('id_cp_rate_service_code' => pSQL($s), 'id_cp_rate_config' => (int)Tools::getValue('id_cp_rate_config'), 'date_add' => pSQL($date), 'date_upd' => pSQL($date));
|
||||
@@ -1122,8 +1122,8 @@ class CanadaPost extends CarrierModule
|
||||
// Delete Script
|
||||
if (Tools::getValue('action') == 'delete' && Tools::getValue('id_cp_rate_config'))
|
||||
{
|
||||
$result1 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result2 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result1 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
$result2 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cp_rate_config_service` WHERE `id_cp_rate_config` = '.(int)Tools::getValue('id_cp_rate_config'));
|
||||
|
||||
// Display Results
|
||||
if ($result1)
|
||||
@@ -1265,7 +1265,7 @@ class CanadaPost extends CarrierModule
|
||||
$productConfiguration = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_product` = '.(int)($product['id_product']));
|
||||
if ($productConfiguration['id_cp_rate_config'])
|
||||
{
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('
|
||||
$servicesConfiguration = Db::getInstance()->executeS('
|
||||
SELECT urcs.*, ursc.`id_carrier`
|
||||
FROM `'._DB_PREFIX_.'cp_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'cp_rate_service_code` ursc ON (ursc.`id_cp_rate_service_code` = urcs.`id_cp_rate_service_code`)
|
||||
@@ -1282,7 +1282,7 @@ class CanadaPost extends CarrierModule
|
||||
$categoryConfiguration = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'cp_rate_config` WHERE `id_category` = '.(int)($product['id_category_default']));
|
||||
if ($categoryConfiguration['id_cp_rate_config'])
|
||||
{
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('
|
||||
$servicesConfiguration = Db::getInstance()->executeS('
|
||||
SELECT urcs.*, ursc.`id_carrier`
|
||||
FROM `'._DB_PREFIX_.'cp_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'cp_rate_service_code` ursc ON (ursc.`id_cp_rate_service_code` = urcs.`id_cp_rate_service_code`)
|
||||
@@ -1294,7 +1294,7 @@ class CanadaPost extends CarrierModule
|
||||
}
|
||||
|
||||
// Return general config
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code` WHERE `active` = 1');
|
||||
$servicesConfiguration = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code` WHERE `active` = 1');
|
||||
foreach ($servicesConfiguration as $service)
|
||||
$config['services'][$service['id_cp_rate_service_code']] = $service;
|
||||
return $config;
|
||||
@@ -1326,7 +1326,7 @@ class CanadaPost extends CarrierModule
|
||||
$weight += Tools::getValue('cp_carrier_packaging_weight', Configuration::get('CP_CARRIER_PACKAGING_WEIGHT'));
|
||||
|
||||
// Get service in adequation with carrier and check if available
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code` WHERE `active` = 1');
|
||||
$servicesConfiguration = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code` WHERE `active` = 1');
|
||||
foreach ($servicesConfiguration as $service)
|
||||
$config['services'][$service['id_cp_rate_service_code']] = $service;
|
||||
$serviceSelected = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'cp_rate_service_code` WHERE `id_carrier` = '.(int)($this->id_carrier));
|
||||
@@ -1487,7 +1487,7 @@ class CanadaPost extends CarrierModule
|
||||
if (!empty($service))
|
||||
$servicesList = array(array('service' => $service));
|
||||
else
|
||||
$servicesList = Db::getInstance()->ExecuteS('SELECT `service` FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
$servicesList = Db::getInstance()->executeS('SELECT `service` FROM `'._DB_PREFIX_.'cp_rate_service_code`');
|
||||
|
||||
// Testing Service
|
||||
foreach ($servicesList as $service)
|
||||
|
||||
@@ -31,19 +31,19 @@ class Disposition
|
||||
|
||||
public static function create($id_cart, $mtid, $amount, $currency)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'INSERT INTO `'._DB_PREFIX_.self::TABLE_NAME.'` (`id_cart`, `mtid`, `amount`, `currency`)
|
||||
VALUES ('.(int)($id_cart).',\''.pSQL($mtid).'\','.(float)($amount).',\''.pSQL($currency).'\')');
|
||||
}
|
||||
|
||||
public static function delete($id)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
}
|
||||
|
||||
public static function deleteByCartId($id_cart)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
}
|
||||
|
||||
public static function getByCartId($id_cart)
|
||||
@@ -53,7 +53,7 @@ class Disposition
|
||||
|
||||
public static function createTable()
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'` (
|
||||
`id_disposition` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id_cart` int(11) NOT NULL,
|
||||
@@ -67,12 +67,12 @@ class Disposition
|
||||
|
||||
public static function dropTable()
|
||||
{
|
||||
return Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
return Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
}
|
||||
|
||||
public static function updateAmount($id_disposition, $amount)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'UPDATE `'._DB_PREFIX_.self::TABLE_NAME.'` SET `amount` = `amount` - '.(float)($amount).' WHERE `id_disposition` = '.(int)($id_disposition));
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
private function _getAllowedCurrencies()
|
||||
{
|
||||
if (empty($this->allowed_currencies))
|
||||
$this->allowed_currencies = DB::getInstance()->ExecuteS(
|
||||
$this->allowed_currencies = DB::getInstance()->executeS(
|
||||
'SELECT c.id_currency, c.iso_code, c.name, c.sign
|
||||
FROM '._DB_PREFIX_.'currency c
|
||||
WHERE c.deleted = 0
|
||||
|
||||
@@ -141,7 +141,7 @@ class Criteo extends Module
|
||||
'PS_CURRENCY_DEFAULT',
|
||||
'PS_CARRIER_DEFAULT'));
|
||||
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT p.`id_product`, i.`id_image`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.id_product = p.id_product)
|
||||
@@ -205,7 +205,7 @@ class Criteo extends Module
|
||||
'PS_CARRIER_DEFAULT'));
|
||||
|
||||
/* Searching for products */
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT p.`id_product`, i.`id_image`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.id_product = p.id_product)
|
||||
|
||||
@@ -127,7 +127,7 @@ class CrossSelling extends Module
|
||||
$pIds[] = (int)$product['id_product'];
|
||||
}
|
||||
$qOrders .= ')';
|
||||
$orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($qOrders);
|
||||
$orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($qOrders);
|
||||
|
||||
if (sizeof($orders))
|
||||
{
|
||||
@@ -138,7 +138,7 @@ class CrossSelling extends Module
|
||||
$list = rtrim($list, ',');
|
||||
|
||||
$list_product_ids = join(',', $pIds);
|
||||
$orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT od.product_id, pl.name, pl.link_rewrite, p.reference, i.id_image, p.show_price, cl.link_rewrite category, p.ean13
|
||||
FROM '._DB_PREFIX_.'order_detail od
|
||||
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id)
|
||||
@@ -173,7 +173,7 @@ class CrossSelling extends Module
|
||||
public function hookProductFooter($params)
|
||||
{
|
||||
|
||||
$orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT o.id_order
|
||||
FROM '._DB_PREFIX_.'orders o
|
||||
LEFT JOIN '._DB_PREFIX_.'order_detail od ON (od.id_order = o.id_order)
|
||||
@@ -186,7 +186,7 @@ class CrossSelling extends Module
|
||||
$list .= (int)$order['id_order'].',';
|
||||
$list = rtrim($list, ',');
|
||||
|
||||
$orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT od.product_id, pl.name, pl.link_rewrite, p.reference, i.id_image, p.show_price, cl.link_rewrite category, p.ean13
|
||||
FROM '._DB_PREFIX_.'order_detail od
|
||||
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id)
|
||||
|
||||
@@ -51,7 +51,7 @@ class DateOfDelivery extends Module
|
||||
if (!parent::install() OR !$this->registerHook('beforeCarrier') OR !$this->registerHook('orderDetailDisplayed'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'dateofdelivery_carrier_rule` (
|
||||
`id_carrier_rule` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`id_carrier` INT NOT NULL,
|
||||
@@ -79,7 +79,7 @@ class DateOfDelivery extends Module
|
||||
Configuration::deleteByName('DOD_PREPARATION_SATURDAY');
|
||||
Configuration::deleteByName('DOD_PREPARATION_SUNDAY');
|
||||
Configuration::deleteByName('DOD_DATE_FORMAT');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'dateofdelivery_carrier_rule`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'dateofdelivery_carrier_rule`');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
@@ -174,7 +174,7 @@ class DateOfDelivery extends Module
|
||||
{
|
||||
if (Tools::isSubmit('addCarrierRule'))
|
||||
{
|
||||
if (Db::getInstance()->Execute('
|
||||
if (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'dateofdelivery_carrier_rule`(`id_carrier`, `minimal_time`, `maximal_time`, `delivery_saturday`, `delivery_sunday`)
|
||||
VALUES ('.(int)($carrier->id).', '.(int)(Tools::getValue('minimal_time')).', '.(int)(Tools::getValue('maximal_time')).', '.(int)(Tools::isSubmit('delivery_saturday')).', '.(int)(Tools::isSubmit('delivery_sunday')).')
|
||||
'))
|
||||
@@ -184,7 +184,7 @@ class DateOfDelivery extends Module
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Db::getInstance()->Execute('
|
||||
if (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'dateofdelivery_carrier_rule`
|
||||
SET `id_carrier` = '.(int)($carrier->id).', `minimal_time` = '.(int)(Tools::getValue('minimal_time')).', `maximal_time` = '.(int)(Tools::getValue('maximal_time')).', `delivery_saturday` = '.(int)(Tools::isSubmit('delivery_saturday')).', `delivery_sunday` = '.(int)(Tools::isSubmit('delivery_sunday')).'
|
||||
WHERE `id_carrier_rule` = '.(int)(Tools::getValue('id_carrier_rule'))
|
||||
@@ -368,7 +368,7 @@ class DateOfDelivery extends Module
|
||||
|
||||
private function _getCarrierRulesWithCarrierName()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` dcr
|
||||
LEFT JOIN `'._DB_PREFIX_.'carrier` c ON (c.`id_carrier` = dcr.`id_carrier`)
|
||||
@@ -412,7 +412,7 @@ class DateOfDelivery extends Module
|
||||
{
|
||||
if (!(int)($id_carrier_rule))
|
||||
return false;
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule`
|
||||
WHERE `id_carrier_rule` = '.(int)($id_carrier_rule)
|
||||
);
|
||||
|
||||
@@ -90,16 +90,16 @@ class Dejala extends CarrierModule
|
||||
if (!isset($this->dejalaConfig->internal_version) || $this->dejalaConfig->internal_version < $this->internal_version)
|
||||
{
|
||||
$this->unregisterHook('cart') ;
|
||||
$res = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'dejala_cart` LIMIT 1') ;
|
||||
$res = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'dejala_cart` LIMIT 1') ;
|
||||
if ($res)
|
||||
{
|
||||
if (!array_key_exists('cart_date_upd', (int)$res[0]))
|
||||
{
|
||||
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'dejala_cart` ADD COLUMN cart_date_upd DATETIME DEFAULT 0;');
|
||||
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'dejala_cart` ADD COLUMN cart_date_upd DATETIME DEFAULT 0;');
|
||||
}
|
||||
if (!array_key_exists('delivery_price', (int)$res[0]))
|
||||
{
|
||||
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'dejala_cart` ADD COLUMN delivery_price FLOAT DEFAULT NULL;');
|
||||
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'dejala_cart` ADD COLUMN delivery_price FLOAT DEFAULT NULL;');
|
||||
}
|
||||
}
|
||||
$this->dejalaConfig->internal_version = $this->internal_version ;
|
||||
@@ -125,7 +125,7 @@ class Dejala extends CarrierModule
|
||||
foreach ($sql as $query)
|
||||
if (!empty($query))
|
||||
{
|
||||
if (!Db::getInstance()->Execute(trim($query)))
|
||||
if (!Db::getInstance()->execute(trim($query)))
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class DejalaCarrierUtils
|
||||
|
||||
$carrier->addZone((int)$id_zone) ;
|
||||
/*$sql = 'INSERT INTO `'._DB_PREFIX_.'carrier_zone` (`id_carrier` , `id_zone`) VALUES ('.(int)($carrier->id).', ' . (int)($id_zone) . ')';
|
||||
Db::getInstance()->Execute($sql);
|
||||
Db::getInstance()->execute($sql);
|
||||
|
||||
$rangeW = new RangeWeight();
|
||||
$rangeW->id_carrier = $carrier->id;
|
||||
|
||||
@@ -65,7 +65,7 @@ class DejalaCart extends ObjectModel
|
||||
parent::save($nullValues, $autodate) ;
|
||||
if (isset($this->wanted_cart_id))
|
||||
{
|
||||
Db::getInstance()->Execute('UPDATE ' . _DB_PREFIX_ . $this->table . ' SET ' . $this->identifier . ' = ' . (int)$this->wanted_cart_id . ' WHERE ' . $this->identifier . ' = ' . (int)$this->id);
|
||||
Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . $this->table . ' SET ' . $this->identifier . ' = ' . (int)$this->wanted_cart_id . ' WHERE ' . $this->identifier . ' = ' . (int)$this->id);
|
||||
$this->id = (int)$this->wanted_cart_id ;
|
||||
unset($this->wanted_cart_id) ;
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ if (file_exists($configPath))
|
||||
if ($_GET['level'] >= $i)
|
||||
{
|
||||
if ($i == 0)
|
||||
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = 1 AND `id_category_ref` = `id_category_ref_parent`');
|
||||
$eBayCategoryListLevel = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = 1 AND `id_category_ref` = `id_category_ref_parent`');
|
||||
else
|
||||
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = '.(int)($i + 1).' AND `id_category_ref_parent` IN (SELECT `id_category_ref` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_ebay_category` = '.(int)($_GET['level'.$i]).')');
|
||||
$eBayCategoryListLevel = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = '.(int)($i + 1).' AND `id_category_ref_parent` IN (SELECT `id_category_ref` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_ebay_category` = '.(int)($_GET['level'.$i]).')');
|
||||
if ($eBayCategoryListLevel)
|
||||
{
|
||||
$levelExists[$i + 1] = true;
|
||||
|
||||
@@ -34,9 +34,9 @@ if (file_exists($configPath))
|
||||
if ($_GET['level'] >= $i)
|
||||
{
|
||||
if ($i == 0)
|
||||
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = 1 AND `id_category_ref` = `id_category_ref_parent`');
|
||||
$eBayCategoryListLevel = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = 1 AND `id_category_ref` = `id_category_ref_parent`');
|
||||
else
|
||||
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = '.(int)($i + 1).' AND `id_category_ref_parent` IN (SELECT `id_category_ref` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_ebay_category` = '.(int)($_GET['level'.$i]).')');
|
||||
$eBayCategoryListLevel = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = '.(int)($i + 1).' AND `id_category_ref_parent` IN (SELECT `id_category_ref` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_ebay_category` = '.(int)($_GET['level'.$i]).')');
|
||||
if ($eBayCategoryListLevel)
|
||||
{
|
||||
$levelExists[$i + 1] = true;
|
||||
|
||||
+20
-20
@@ -170,7 +170,7 @@ class Ebay extends Module
|
||||
// Install SQL
|
||||
include(dirname(__FILE__).'/sql-install.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
|
||||
// Install Module
|
||||
@@ -210,7 +210,7 @@ class Ebay extends Module
|
||||
// Uninstall SQL
|
||||
include(dirname(__FILE__).'/sql-uninstall.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
Configuration::deleteByName('EBAY_API_SESSION');
|
||||
Configuration::deleteByName('EBAY_API_USERNAME');
|
||||
@@ -258,7 +258,7 @@ class Ebay extends Module
|
||||
// Upgrade SQL
|
||||
include(dirname(__FILE__).'/sql-upgrade-1-2.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
Configuration::updateValue('EBAY_VERSION', $this->version);
|
||||
}
|
||||
@@ -278,7 +278,7 @@ class Ebay extends Module
|
||||
if (Configuration::get('EBAY_SYNC_MODE') == 'A')
|
||||
{
|
||||
// Retrieve product list for eBay (which have matched categories) AND Send each product on eBay
|
||||
$productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE '.$sql.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)');
|
||||
$productsList = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE '.$sql.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)');
|
||||
foreach ($productList as $k => $v)
|
||||
$productList[$k]['noPriceUpdate'] = 1;
|
||||
if ($productsList)
|
||||
@@ -287,7 +287,7 @@ class Ebay extends Module
|
||||
else if (Configuration::get('EBAY_SYNC_MODE') == 'B')
|
||||
{
|
||||
// Select the sync Categories and Retrieve product list for eBay (which have matched and sync categories) AND Send each product on eBay
|
||||
$productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE '.$sql.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)');
|
||||
$productsList = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE '.$sql.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)');
|
||||
foreach ($productList as $k => $v)
|
||||
$productList[$k]['noPriceUpdate'] = 1;
|
||||
if ($productsList)
|
||||
@@ -307,14 +307,14 @@ class Ebay extends Module
|
||||
if (Configuration::get('EBAY_SYNC_MODE') == 'A')
|
||||
{
|
||||
// Retrieve product list for eBay (which have matched categories) AND Send each product on eBay
|
||||
$productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)$id_product.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)');
|
||||
$productsList = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)$id_product.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)');
|
||||
if ($productsList)
|
||||
$this->_syncProducts($productsList);
|
||||
}
|
||||
else if (Configuration::get('EBAY_SYNC_MODE') == 'B')
|
||||
{
|
||||
// Select the sync Categories and Retrieve product list for eBay (which have matched and sync categories) AND Send each product on eBay
|
||||
$productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)$id_product.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)');
|
||||
$productsList = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)$id_product.' AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)');
|
||||
if ($productsList)
|
||||
$this->_syncProducts($productsList);
|
||||
}
|
||||
@@ -930,11 +930,11 @@ class Ebay extends Module
|
||||
|
||||
// Loading categories
|
||||
$categoryConfigList = array();
|
||||
$categoryConfigListTmp = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
$categoryConfigListTmp = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
foreach ($categoryConfigListTmp as $c)
|
||||
$categoryConfigList[$c['id_category']] = $c;
|
||||
$categoryList = $this->_getChildCategories(Category::getCategories($this->context->language->id), 0);
|
||||
$eBayCategoryList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_category_ref` = `id_category_ref_parent`');
|
||||
$eBayCategoryList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_category_ref` = `id_category_ref_parent`');
|
||||
|
||||
|
||||
// Display header
|
||||
@@ -1041,10 +1041,10 @@ class Ebay extends Module
|
||||
// Loading categories
|
||||
$ebay = new eBayRequest();
|
||||
$categoryConfigList = array();
|
||||
$categoryConfigListTmp = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
$categoryConfigListTmp = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
foreach ($categoryConfigListTmp as $c)
|
||||
$categoryConfigList[$c['id_category']] = $c;
|
||||
$categoryList = Db::getInstance()->ExecuteS('SELECT `id_category`, `name` FROM `'._DB_PREFIX_.'category_lang` WHERE `id_lang` = '.(int)$this->id_lang.$this->context->shop->sqlLang('cl'));
|
||||
$categoryList = Db::getInstance()->executeS('SELECT `id_category`, `name` FROM `'._DB_PREFIX_.'category_lang` WHERE `id_lang` = '.(int)$this->id_lang.$this->context->shop->sqlLang('cl'));
|
||||
|
||||
foreach ($categoryList as $k => $c)
|
||||
if (!isset($categoryConfigList[$c['id_category']]))
|
||||
@@ -1087,7 +1087,7 @@ class Ebay extends Module
|
||||
if ($arraySQL)
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_category_configuration', $arraySQL, 'UPDATE', '`id_category` = '.(int)$id_category);
|
||||
else
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` = '.(int)$id_category);
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` = '.(int)$id_category);
|
||||
}
|
||||
elseif ($arraySQL)
|
||||
{
|
||||
@@ -1317,7 +1317,7 @@ class Ebay extends Module
|
||||
|
||||
// Loading categories
|
||||
$categoryConfigList = array();
|
||||
$categoryConfigListTmp = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
$categoryConfigListTmp = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'ebay_category_configuration`');
|
||||
foreach ($categoryConfigListTmp as $c)
|
||||
$categoryConfigList[$c['id_category']] = $c;
|
||||
$categoryList = $this->_getChildCategories(Category::getCategories($this->context->language->id), 0);
|
||||
@@ -1428,7 +1428,7 @@ class Ebay extends Module
|
||||
AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)');
|
||||
|
||||
// Retrieve products list for eBay (which have matched categories)
|
||||
$productsList = Db::getInstance()->ExecuteS('
|
||||
$productsList = Db::getInstance()->executeS('
|
||||
SELECT `id_product` FROM `'._DB_PREFIX_.'product`
|
||||
WHERE `quantity` > 0 AND `active` = 1
|
||||
AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)
|
||||
@@ -1455,7 +1455,7 @@ class Ebay extends Module
|
||||
AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)');
|
||||
|
||||
// Retrieve products list for eBay (which have matched categories)
|
||||
$productsList = Db::getInstance()->ExecuteS('
|
||||
$productsList = Db::getInstance()->executeS('
|
||||
SELECT `id_product` FROM `'._DB_PREFIX_.'product`
|
||||
WHERE `quantity` > 0 AND `active` = 1
|
||||
AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)
|
||||
@@ -1684,7 +1684,7 @@ class Ebay extends Module
|
||||
if ($ebay->errorCode == 291)
|
||||
{
|
||||
// We delete from DB and Add it on eBay
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
$ebay->addFixedPriceItemMultiSku($datas);
|
||||
if ($ebay->itemID > 0)
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => 0, 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT');
|
||||
@@ -1754,7 +1754,7 @@ class Ebay extends Module
|
||||
{
|
||||
// Delete
|
||||
if ($ebay->endFixedPriceItem($datasTmp))
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datasTmp['itemID']).'\'');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datasTmp['itemID']).'\'');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1766,7 +1766,7 @@ class Ebay extends Module
|
||||
if ($ebay->errorCode == 291)
|
||||
{
|
||||
// We delete from DB and Add it on eBay
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datasTmp['itemID']).'\'');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datasTmp['itemID']).'\'');
|
||||
$ebay->addFixedPriceItem($datasTmp);
|
||||
if ($ebay->itemID > 0)
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => (int)$datasTmp['id_attribute'], 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT');
|
||||
@@ -1814,7 +1814,7 @@ class Ebay extends Module
|
||||
{
|
||||
// Delete
|
||||
if ($ebay->endFixedPriceItem($datas))
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1826,7 +1826,7 @@ class Ebay extends Module
|
||||
if ($ebay->errorCode == 291)
|
||||
{
|
||||
// We delete from DB and Add it on eBay
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
|
||||
$ebay->addFixedPriceItem($datas);
|
||||
if ($ebay->itemID > 0)
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => 0, 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT');
|
||||
|
||||
@@ -53,7 +53,7 @@ class Editorial extends Module
|
||||
if (!parent::install() OR !$this->registerHook('home') OR !$this->registerHook('header'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'editorial` (
|
||||
`id_editorial` int(10) unsigned NOT NULL auto_increment,
|
||||
`body_home_logo_link` varchar(255) NOT NULL,
|
||||
@@ -61,7 +61,7 @@ class Editorial extends Module
|
||||
ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'editorial_lang` (
|
||||
`id_editorial` int(10) unsigned NOT NULL,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
@@ -73,17 +73,17 @@ class Editorial extends Module
|
||||
ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial`(`id_editorial`, `body_home_logo_link`)
|
||||
VALUES(1, "http://www.prestashop.com")'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial_lang`(`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`)
|
||||
VALUES(1, 1, "Lorem ipsum dolor sit amet", "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>", "Excepteur sint prestashop cupidatat non proident")'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'editorial_lang`(`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`)
|
||||
VALUES(1, 2, "Lorem ipsum dolor sit amet", "Excepteur sint occaecat cupidatat non proident", "<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>", "Lorem ipsum presta shop amet")'))
|
||||
return false;
|
||||
@@ -94,8 +94,8 @@ class Editorial extends Module
|
||||
{
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
return (Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'editorial`') AND
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'editorial_lang`'));
|
||||
return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'editorial`') AND
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'editorial_lang`'));
|
||||
}
|
||||
|
||||
public function putContent($xml_data, $key, $field, $forbidden, $section)
|
||||
|
||||
@@ -107,7 +107,7 @@ class AdminEnvoiMoinsCher extends AdminTab
|
||||
AND o.id_carrier = '.pSQL($id_carrier).'
|
||||
GROUP BY o.`id_order`, od.`id_order`
|
||||
ORDER BY o.`date_add` ASC';
|
||||
return Db::getInstance()->ExecuteS($sql);
|
||||
return Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
private function displayOrders($orders)
|
||||
|
||||
@@ -87,7 +87,7 @@ class Envoimoinscher extends Module
|
||||
$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 AND sizeof($query) AND !Db::getInstance()->Execute(trim($query)))
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
if (substr(_PS_VERSION_, 2, 3) <= 3.1)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ class Envoimoinscher extends Module
|
||||
$this->_errors[] = $this->l('Please manually copy ') .dirname(__FILE__).'/AdminEnvoiMoinsCher.gif'.' in the '._PS_IMG_DIR_.'/t/AdminEnvoiMoinsCher.gif folder located in your admin directory.';
|
||||
}
|
||||
if (!parent::install() OR !Configuration::updateValue('EMC_EMAILS', 1) OR !$this->registerHook('AdminOrder') OR !self::adminInstall()
|
||||
OR !Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'envoimoinscher` (`id_order` int(10) unsigned NOT NULL, `shipping_number` varchar(30) NOT NULL ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=latin1;'))
|
||||
OR !Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'envoimoinscher` (`id_order` int(10) unsigned NOT NULL, `shipping_number` varchar(30) NOT NULL ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=latin1;'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class Envoimoinscher extends Module
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'envoimoinscher_contenu`');
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'envoimoinscher_contenu`');
|
||||
|
||||
$tab = new Tab(Tab::getIdFromClassName('AdminEnvoiMoinsCher'));
|
||||
if (!parent::uninstall() OR !$tab->delete() OR !$this->unregisterHook('AdminOrder'))
|
||||
@@ -528,7 +528,7 @@ class Envoimoinscher extends Module
|
||||
$order = new Order($params['id_order']);
|
||||
if ($order->id_carrier == Configuration::get('EMC_CARRIER'))
|
||||
{
|
||||
$return = Db::getInstance()->ExecuteS('SELECT * FROM '._DB_PREFIX_.'envoimoinscher WHERE id_order = \''.(int)($order->id).'\' LIMIT 1');
|
||||
$return = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'envoimoinscher WHERE id_order = \''.(int)($order->id).'\' LIMIT 1');
|
||||
if (isset($return[0]['shipping_number']))
|
||||
{
|
||||
$html = '<br><br><fieldset style="width: 400px;"><legend><img src="'.$this->_path.'logo.gif" alt="" /> '.$this->l('Envoimoinscher').'</legend>';
|
||||
|
||||
@@ -58,15 +58,15 @@ if (isset($return['infoexterne']) AND isset($return['token']) AND isset($return[
|
||||
$history->addWithemail();
|
||||
|
||||
$db = Db::getInstance();
|
||||
$db->ExecuteS('SELECT * FROM '._DB_PREFIX_.'envoimoinscher WHERE id_order = '.(int)($id_order));
|
||||
$db->executeS('SELECT * FROM '._DB_PREFIX_.'envoimoinscher WHERE id_order = '.(int)($id_order));
|
||||
$numRows = (int)($db->NumRows());
|
||||
if ($numRows == 0)
|
||||
{
|
||||
if (Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'envoimoinscher VALUES (\''.(int)($id_order).'\', \''.pSQL($return['envoi']).'\');'));
|
||||
if (Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'envoimoinscher VALUES (\''.(int)($id_order).'\', \''.pSQL($return['envoi']).'\');'));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'envoimoinscher SET shipping_number=\''.pSQL($return['envoi']).'\' WHERE id_order=\''.(int)($id_order).'\' '));
|
||||
if (Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'envoimoinscher SET shipping_number=\''.pSQL($return['envoi']).'\' WHERE id_order=\''.(int)($id_order).'\' '));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -71,7 +71,7 @@ class FavoriteProduct extends ObjectModel
|
||||
if (!$shop)
|
||||
$shop = Context::getContext()->shop;
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT fp.`id_shop`, p.`id_product`, pl.`description_short`, pl.`link_rewrite`, pl.`name`, i.`id_image`, CONCAT(p.`id_product`, \'-\', i.`id_image`) as image
|
||||
FROM `'._DB_PREFIX_.'favorite_product` fp
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = fp.`id_product`)
|
||||
|
||||
@@ -52,7 +52,7 @@ class FavoriteProducts extends Module
|
||||
OR !$this->registerHook('header'))
|
||||
return false;
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'favorite_product` (
|
||||
`id_favorite_product` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
@@ -69,7 +69,7 @@ class FavoriteProducts extends Module
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
if (!parent::uninstall() OR !Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'favorite_product`'))
|
||||
if (!parent::uninstall() OR !Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'favorite_product`'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class FedexCarrier extends CarrierModule
|
||||
// Install SQL
|
||||
include(dirname(__FILE__).'/sql-install.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
|
||||
// Install Carriers
|
||||
@@ -208,7 +208,7 @@ class FedexCarrier extends CarrierModule
|
||||
// Uninstall SQL
|
||||
include(dirname(__FILE__).'/sql-uninstall.php');
|
||||
foreach ($sql as $s)
|
||||
if (!Db::getInstance()->Execute($s))
|
||||
if (!Db::getInstance()->execute($s))
|
||||
return false;
|
||||
|
||||
// Uninstall Module
|
||||
@@ -224,7 +224,7 @@ class FedexCarrier extends CarrierModule
|
||||
Db::getInstance()->autoExecute(_DB_PREFIX_.'fedex_rate_service_code', array('active' => 0), 'UPDATE');
|
||||
|
||||
// Get all services availables
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach ($rateServiceList as $rateService)
|
||||
if (!$rateService['id_carrier'])
|
||||
{
|
||||
@@ -536,7 +536,7 @@ class FedexCarrier extends CarrierModule
|
||||
<label>'.$this->l('State').' : </label>
|
||||
<div class="margin-form">';
|
||||
$id_country_current = 0;
|
||||
$statesList = Db::getInstance()->ExecuteS('
|
||||
$statesList = Db::getInstance()->executeS('
|
||||
SELECT `id_state`, `id_country`, `name`
|
||||
FROM `'._DB_PREFIX_.'state` WHERE `active` = 1
|
||||
ORDER BY `id_country`, `name` ASC');
|
||||
@@ -586,7 +586,7 @@ class FedexCarrier extends CarrierModule
|
||||
</div>
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_fedex_rate_service_code'].'" '.(($rateService['active'] == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].' '.($this->webserviceTest($rateService['code']) ? '('.$this->l('Available').')' : '('.$this->l('Not available').')').'<br />';
|
||||
$html .= '
|
||||
@@ -722,7 +722,7 @@ class FedexCarrier extends CarrierModule
|
||||
|
||||
if (isset($category['id_category']))
|
||||
{
|
||||
$categories = Db::getInstance()->ExecuteS('
|
||||
$categories = Db::getInstance()->executeS('
|
||||
SELECT c.id_category, cl.name, cl.link_rewrite
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.$this->context->shop->sqlLang('cl').')
|
||||
@@ -792,7 +792,7 @@ class FedexCarrier extends CarrierModule
|
||||
<tbody>';
|
||||
|
||||
// Loading config list
|
||||
$configCategoryList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_category` > 0');
|
||||
$configCategoryList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_category` > 0');
|
||||
if (!$configCategoryList)
|
||||
$html .= '<tr><td colspan="6">'.$this->l('There is no specific FEDEX configuration for categories at this point.').'</td></tr>';
|
||||
foreach ($configCategoryList as $k => $c)
|
||||
@@ -811,7 +811,7 @@ class FedexCarrier extends CarrierModule
|
||||
|
||||
// Loading services attached to this config
|
||||
$services = '';
|
||||
$servicesTab = Db::getInstance()->ExecuteS('
|
||||
$servicesTab = Db::getInstance()->executeS('
|
||||
SELECT ursc.`service`
|
||||
FROM `'._DB_PREFIX_.'fedex_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'fedex_rate_service_code` ursc ON (ursc.`id_fedex_rate_service_code` = urcs.`id_fedex_rate_service_code`)
|
||||
@@ -885,7 +885,7 @@ class FedexCarrier extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges', $configSelected['additional_charges'])).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
{
|
||||
$configServiceSelected = Db::getInstance()->getValue('SELECT `id_fedex_rate_service_code` FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)(Tools::getValue('id_fedex_rate_config')).' AND `id_fedex_rate_service_code` = '.(int)($rateService['id_fedex_rate_service_code']));
|
||||
@@ -928,7 +928,7 @@ class FedexCarrier extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges')).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_fedex_rate_service_code'].'" '.(($this->_isPostCheck($rateService['id_fedex_rate_service_code']) == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].'<br />';
|
||||
$html .= '
|
||||
@@ -1010,7 +1010,7 @@ class FedexCarrier extends CarrierModule
|
||||
'date_upd' => pSQL($date)
|
||||
);
|
||||
$result = Db::getInstance()->autoExecute(_DB_PREFIX_.'fedex_rate_config', $updTab, 'UPDATE', '`id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
foreach ($services as $s)
|
||||
{
|
||||
$addTab = array('id_fedex_rate_service_code' => pSQL($s), 'id_fedex_rate_config' => (int)Tools::getValue('id_fedex_rate_config'), 'date_add' => pSQL($date), 'date_upd' => pSQL($date));
|
||||
@@ -1027,8 +1027,8 @@ class FedexCarrier extends CarrierModule
|
||||
// Delete Script
|
||||
if (Tools::getValue('action') == 'delete' && Tools::getValue('id_fedex_rate_config'))
|
||||
{
|
||||
$result1 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result2 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result1 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result2 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
|
||||
// Display Results
|
||||
if ($result1)
|
||||
@@ -1068,7 +1068,7 @@ class FedexCarrier extends CarrierModule
|
||||
<tbody>';
|
||||
|
||||
// Loading config list
|
||||
$configProductList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_product` > 0');
|
||||
$configProductList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_product` > 0');
|
||||
if (!$configProductList)
|
||||
$html .= '<tr><td colspan="6">'.$this->l('There is no specific FEDEX configuration for products at this point.').'</td></tr>';
|
||||
foreach ($configProductList as $k => $c)
|
||||
@@ -1081,7 +1081,7 @@ class FedexCarrier extends CarrierModule
|
||||
|
||||
// Loading services attached to this config
|
||||
$services = '';
|
||||
$servicesTab = Db::getInstance()->ExecuteS('
|
||||
$servicesTab = Db::getInstance()->executeS('
|
||||
SELECT ursc.`service`
|
||||
FROM `'._DB_PREFIX_.'fedex_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'fedex_rate_service_code` ursc ON (ursc.`id_fedex_rate_service_code` = urcs.`id_fedex_rate_service_code`)
|
||||
@@ -1147,7 +1147,7 @@ class FedexCarrier extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges', $configSelected['additional_charges'])).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
{
|
||||
$configServiceSelected = Db::getInstance()->getValue('SELECT `id_fedex_rate_service_code` FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)(
|
||||
@@ -1168,7 +1168,7 @@ class FedexCarrier extends CarrierModule
|
||||
<div class="margin-form">
|
||||
<select name="id_product">
|
||||
<option value="0">'.$this->l('Select a product ...').'</option>';
|
||||
$productsList = Db::getInstance()->ExecuteS('
|
||||
$productsList = Db::getInstance()->executeS('
|
||||
SELECT pl.* FROM `'._DB_PREFIX_.'product` p
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id.$this->context->shop->sqlLang('pl').')
|
||||
WHERE p.`active` = 1
|
||||
@@ -1197,7 +1197,7 @@ class FedexCarrier extends CarrierModule
|
||||
<div class="margin-form"><input type="text" size="20" name="additional_charges" value="'.Tools::safeOutput(Tools::getValue('additional_charges')).'" /></div><br />
|
||||
<label>'.$this->l('Delivery Service').' : </label>
|
||||
<div class="margin-form">';
|
||||
$rateServiceList = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$rateServiceList = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
foreach($rateServiceList as $rateService)
|
||||
$html .= '<input type="checkbox" name="service[]" value="'.$rateService['id_fedex_rate_service_code'].'" '.(($this->_isPostCheck($rateService['id_fedex_rate_service_code']) == 1) ? 'checked="checked"' : '').' /> '.$rateService['service'].'<br />';
|
||||
$html .= '
|
||||
@@ -1279,7 +1279,7 @@ class FedexCarrier extends CarrierModule
|
||||
'date_upd' => pSQL($date)
|
||||
);
|
||||
$result = Db::getInstance()->autoExecute(_DB_PREFIX_.'fedex_rate_config', $updTab, 'UPDATE', '`id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
foreach ($services as $s)
|
||||
{
|
||||
$addTab = array('id_fedex_rate_service_code' => pSQL($s), 'id_fedex_rate_config' => (int)Tools::getValue('id_fedex_rate_config'), 'date_add' => pSQL($date), 'date_upd' => pSQL($date));
|
||||
@@ -1296,8 +1296,8 @@ class FedexCarrier extends CarrierModule
|
||||
// Delete Script
|
||||
if (Tools::getValue('action') == 'delete' && Tools::getValue('id_fedex_rate_config'))
|
||||
{
|
||||
$result1 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result2 = Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result1 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
$result2 = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'fedex_rate_config_service` WHERE `id_fedex_rate_config` = '.(int)Tools::getValue('id_fedex_rate_config'));
|
||||
|
||||
// Display Results
|
||||
if ($result1)
|
||||
@@ -1440,7 +1440,7 @@ class FedexCarrier extends CarrierModule
|
||||
$productConfiguration = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_product` = '.(int)($product['id_product']));
|
||||
if ($productConfiguration['id_fedex_rate_config'])
|
||||
{
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('
|
||||
$servicesConfiguration = Db::getInstance()->executeS('
|
||||
SELECT urcs.*, ursc.`id_carrier`
|
||||
FROM `'._DB_PREFIX_.'fedex_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'fedex_rate_service_code` ursc ON (ursc.`id_fedex_rate_service_code` = urcs.`id_fedex_rate_service_code`)
|
||||
@@ -1457,7 +1457,7 @@ class FedexCarrier extends CarrierModule
|
||||
$categoryConfiguration = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_config` WHERE `id_category` = '.(int)($product['id_category_default']));
|
||||
if ($categoryConfiguration['id_fedex_rate_config'])
|
||||
{
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('
|
||||
$servicesConfiguration = Db::getInstance()->executeS('
|
||||
SELECT urcs.*, ursc.`id_carrier`
|
||||
FROM `'._DB_PREFIX_.'fedex_rate_config_service` urcs
|
||||
LEFT JOIN `'._DB_PREFIX_.'fedex_rate_service_code` ursc ON (ursc.`id_fedex_rate_service_code` = urcs.`id_fedex_rate_service_code`)
|
||||
@@ -1470,7 +1470,7 @@ class FedexCarrier extends CarrierModule
|
||||
|
||||
// Return general config
|
||||
$config['pickup_type_code'] = Configuration::get('FEDEX_CARRIER_PICKUP_TYPE');
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code` WHERE `active` = 1');
|
||||
$servicesConfiguration = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code` WHERE `active` = 1');
|
||||
foreach ($servicesConfiguration as $service)
|
||||
$config['services'][$service['id_fedex_rate_service_code']] = $service;
|
||||
return $config;
|
||||
@@ -1500,7 +1500,7 @@ class FedexCarrier extends CarrierModule
|
||||
$weight += Tools::getValue('fedex_carrier_packaging_weight', Configuration::get('FEDEX_CARRIER_PACKAGING_WEIGHT'));
|
||||
|
||||
// Get service in adequation with carrier and check if available
|
||||
$servicesConfiguration = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code` WHERE `active` = 1');
|
||||
$servicesConfiguration = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code` WHERE `active` = 1');
|
||||
foreach ($servicesConfiguration as $service)
|
||||
$config['services'][$service['id_fedex_rate_service_code']] = $service;
|
||||
$serviceSelected = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'fedex_rate_service_code` WHERE `id_carrier` = '.(int)($this->id_carrier));
|
||||
@@ -1676,7 +1676,7 @@ class FedexCarrier extends CarrierModule
|
||||
if (!empty($service))
|
||||
$servicesList = array(array('code' => $service));
|
||||
else
|
||||
$servicesList = Db::getInstance()->ExecuteS('SELECT `code` FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
$servicesList = Db::getInstance()->executeS('SELECT `code` FROM `'._DB_PREFIX_.'fedex_rate_service_code`');
|
||||
|
||||
|
||||
// Testing Service
|
||||
|
||||
@@ -101,7 +101,7 @@ class Fianetfraud extends Module
|
||||
$sql = str_replace('PREFIX_', _DB_PREFIX_, $sql);
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
foreach ($sql AS $query)
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->Execute(trim($query)))
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
$langs = Language::getLanguages();
|
||||
|
||||
@@ -300,17 +300,17 @@ class Fianetfraud extends Module
|
||||
if($module->id)
|
||||
{
|
||||
$module->country = array();
|
||||
$countries = DB::getInstance()->ExecuteS('SELECT id_country FROM '._DB_PREFIX_.'module_country WHERE id_module = '.(int)($module->id));
|
||||
$countries = DB::getInstance()->executeS('SELECT id_country FROM '._DB_PREFIX_.'module_country WHERE id_module = '.(int)($module->id));
|
||||
foreach ($countries as $country)
|
||||
$module->country[] = $country['id_country'];
|
||||
|
||||
$module->currency = array();
|
||||
$currencies = DB::getInstance()->ExecuteS('SELECT id_currency FROM '._DB_PREFIX_.'module_currency WHERE id_module = '.(int)($module->id));
|
||||
$currencies = DB::getInstance()->executeS('SELECT id_currency FROM '._DB_PREFIX_.'module_currency WHERE id_module = '.(int)($module->id));
|
||||
foreach ($currencies as $currency)
|
||||
$module->currency[] = $currency['id_currency'];
|
||||
|
||||
$module->group = array();
|
||||
$groups = DB::getInstance()->ExecuteS('SELECT id_group FROM '._DB_PREFIX_.'module_group WHERE id_module = '.(int)($module->id));
|
||||
$groups = DB::getInstance()->executeS('SELECT id_group FROM '._DB_PREFIX_.'module_group WHERE id_module = '.(int)($module->id));
|
||||
foreach ($groups as $group)
|
||||
$module->group[] = $group['id_group'];
|
||||
}
|
||||
@@ -351,17 +351,17 @@ class Fianetfraud extends Module
|
||||
{
|
||||
if ($_SERVER['REMOTE_ADDR'] == '0.0.0.0' OR $_SERVER['REMOTE_ADDR'] == '' OR $_SERVER['REMOTE_ADDR'] === false)
|
||||
return true;
|
||||
$res = Db::getInstance()->ExecuteS('
|
||||
$res = Db::getInstance()->executeS('
|
||||
SELECT `id_cart`
|
||||
FROM '._DB_PREFIX_.'fianet_fraud
|
||||
WHERE id_cart = '.(int)($params['cart']->id));
|
||||
if (Db::getInstance()->NumRows() > 0)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'fianet_fraud`
|
||||
SET `ip_address` = '.ip2long($_SERVER['REMOTE_ADDR']).', `date` = \''.pSQL(date('Y-m-d H:i:s')).'\'
|
||||
WHERE `id_cart` = '.(int)($params['cart']->id).' LIMIT 1');
|
||||
else
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'fianet_fraud` (`id_cart`, `ip_address`, `date`)
|
||||
VALUES ('.(int)($params['cart']->id).', '.ip2long($_SERVER['REMOTE_ADDR']).',\''.date('Y-m-d H:i:s').'\')');
|
||||
return true;
|
||||
@@ -526,17 +526,17 @@ class Fianetfraud extends Module
|
||||
|
||||
$sender->add_order($orderFianet);
|
||||
$res = $sender->send_orders_stacking();
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'fianet_fraud_orders(id_order, date_add) VALUES('.(int)($params['order']->id).', \''.pSQL(date('Y-m-d H:i:s')).'\')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fianet_fraud_orders(id_order, date_add) VALUES('.(int)($params['order']->id).', \''.pSQL(date('Y-m-d H:i:s')).'\')');
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function checkWaitingOrders()
|
||||
{
|
||||
$orders = Db::getInstance()->ExecuteS('SELECT id_order FROM '._DB_PREFIX_.'fianet_fraud_orders WHERE `date_add` > \''.pSQL(strtotime('+5 minute')).'\'');
|
||||
$orders = Db::getInstance()->executeS('SELECT id_order FROM '._DB_PREFIX_.'fianet_fraud_orders WHERE `date_add` > \''.pSQL(strtotime('+5 minute')).'\'');
|
||||
foreach ($orders AS $order)
|
||||
{
|
||||
self::updateOrderHistory((int)($order['id_order']));
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'fianet_fraud_orders WHERE id_order='.(int)($order['id_order']));
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fianet_fraud_orders WHERE id_order='.(int)($order['id_order']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ class Fianetfraud extends Module
|
||||
|
||||
public function getSACCategories()
|
||||
{
|
||||
$categories = Db::getInstance()->ExecuteS('SELECT id_category, id_sac FROM '._DB_PREFIX_.'sac_categories');
|
||||
$categories = Db::getInstance()->executeS('SELECT id_category, id_sac FROM '._DB_PREFIX_.'sac_categories');
|
||||
$sac_cat = array();
|
||||
if ($categories)
|
||||
foreach ($categories AS $category)
|
||||
|
||||
@@ -54,7 +54,7 @@ class FianetSceau extends Module
|
||||
return (parent::install() AND
|
||||
$this->registerHook('rightColumn') AND
|
||||
$this->registerHook('updateOrderStatus') AND
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'fianet_seal`(
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_order` int(10) unsigned NOT NULL,
|
||||
@@ -208,7 +208,7 @@ class FianetSceau extends Module
|
||||
return;
|
||||
if ($params['newOrderStatus']->logable == 1)
|
||||
$upload_success = self::sendXML();
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO '._DB_PREFIX_.'fianet_seal (id_order, upload_success, valid, status, date_upd, date_add)
|
||||
VALUES ('.(int)$order->id.', 0,'.(int)$params['newOrderStatus']->logable.', '.(int)$params['newOrderStatus']->id.', NOW(), NOW())');
|
||||
}
|
||||
@@ -218,7 +218,7 @@ class FianetSceau extends Module
|
||||
return;
|
||||
if ($params['newOrderStatus']->logable == 1)
|
||||
$upload_success = self::sendXML();
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'fianet_seal` a
|
||||
SET valid = '.(int)$params['newOrderStatus']->logable.', upload_success = '.(int)$upload_success.', status = '.(int)$params['newOrderStatus']->id.', date_upd = NOW()
|
||||
WHERE a.id = '.(int)$res['id']);
|
||||
|
||||
@@ -55,7 +55,7 @@ class Followup extends Module
|
||||
|
||||
public function install()
|
||||
{
|
||||
$logEmailTable = Db::getInstance()->Execute('
|
||||
$logEmailTable = Db::getInstance()->execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'log_email (
|
||||
`id_log_email` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
|
||||
`id_email_type` INT UNSIGNED NOT NULL ,
|
||||
@@ -82,7 +82,7 @@ class Followup extends Module
|
||||
|
||||
Configuration::deleteByName('PS_FOLLOWUP_SECURE_KEY');
|
||||
|
||||
Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'log_email');
|
||||
Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'log_email');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class Followup extends Module
|
||||
<th colspan="3">'.$this->l('Bad cust.').'</th>
|
||||
</tr>';
|
||||
|
||||
$stats = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$stats = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DATE_FORMAT(l.date_add, \'%Y-%m-%d\') date_stat, l.id_email_type, COUNT(l.id_log_email) nb,
|
||||
(SELECT COUNT(l2.id_discount)
|
||||
FROM '._DB_PREFIX_.'log_email l2
|
||||
@@ -284,7 +284,7 @@ class Followup extends Module
|
||||
if(!empty($emailLogs))
|
||||
$sql .= ' AND c.id_cart NOT IN ('.join(',', $emailLogs).')';
|
||||
|
||||
$emails = Db::getInstance()->ExecuteS($sql);
|
||||
$emails = Db::getInstance()->executeS($sql);
|
||||
|
||||
if ($count OR !sizeof($emails))
|
||||
return sizeof($emails);
|
||||
@@ -317,7 +317,7 @@ class Followup extends Module
|
||||
$query = '
|
||||
SELECT id_cart, id_customer, id_email_type FROM '._DB_PREFIX_.'log_email
|
||||
WHERE id_email_type <> 4 OR date_add >= DATE_SUB(date_add,INTERVAL '.(int)(Configuration::get('PS_FOLLOW_UP_DAYS_THRESHOLD_4')).' DAY)';
|
||||
$results = Db::getInstance()->ExecuteS($query);
|
||||
$results = Db::getInstance()->executeS($query);
|
||||
foreach ($results as $line)
|
||||
{
|
||||
switch ($line['id_email_type'])
|
||||
@@ -355,7 +355,7 @@ class Followup extends Module
|
||||
if(!empty($emailLogs))
|
||||
$sql .= ' NOT IN ('.join(',', $emailLogs).')';
|
||||
|
||||
$emails = Db::getInstance()->ExecuteS($sql);
|
||||
$emails = Db::getInstance()->executeS($sql);
|
||||
|
||||
if ($count OR !sizeof($emails))
|
||||
return sizeof($emails);
|
||||
@@ -392,7 +392,7 @@ class Followup extends Module
|
||||
GROUP BY o.id_customer
|
||||
HAVING total >= '.(float)(Configuration::get('PS_FOLLOW_UP_THRESHOLD_3'));
|
||||
|
||||
$emails = Db::getInstance()->ExecuteS($sql);
|
||||
$emails = Db::getInstance()->executeS($sql);
|
||||
|
||||
if ($count OR !sizeof($emails))
|
||||
return sizeof($emails);
|
||||
@@ -435,7 +435,7 @@ class Followup extends Module
|
||||
|
||||
$sql .= 'GROUP BY cu.id_customer HAVING nb_orders >= 1';
|
||||
|
||||
$emails = Db::getInstance()->ExecuteS($sql);
|
||||
$emails = Db::getInstance()->executeS($sql);
|
||||
|
||||
if ($count OR !sizeof($emails))
|
||||
return sizeof($emails);
|
||||
@@ -497,7 +497,7 @@ class Followup extends Module
|
||||
/* Clean-up database by deleting all outdated discounts */
|
||||
if ($conf['PS_FOLLOW_UP_CLEAN_DB'] == 1)
|
||||
{
|
||||
$outdatedDiscounts = Db::getInstance()->ExecuteS('SELECT id_discount FROM '._DB_PREFIX_.'discount WHERE date_to < NOW()');
|
||||
$outdatedDiscounts = Db::getInstance()->executeS('SELECT id_discount FROM '._DB_PREFIX_.'discount WHERE date_to < NOW()');
|
||||
foreach ($outdatedDiscounts AS $outdatedDiscount)
|
||||
{
|
||||
$discount = new Discount((int)($outdatedDiscount['id_discount']));
|
||||
|
||||
@@ -110,7 +110,7 @@ XML;
|
||||
WHERE s.active = 1
|
||||
AND s.deleted = 0
|
||||
AND su.active = 1';
|
||||
if (!$result = Db::getInstance()->ExecuteS($sql))
|
||||
if (!$result = Db::getInstance()->executeS($sql))
|
||||
return false;
|
||||
|
||||
$res = true;
|
||||
@@ -181,7 +181,7 @@ XML;
|
||||
AND cs.id_shop = '.$shopID.'
|
||||
ORDER BY cl.id_cms, cl.id_lang ASC';
|
||||
|
||||
$cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
foreach ($cmss AS $cms)
|
||||
{
|
||||
$tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ? $this->context->link->getCMSLink((int)$cms['id_cms'], $cms['link_rewrite'], false, (int)$cms['id_lang']) : $this->context->link->getCMSLink((int)$cms['id_cms']);
|
||||
@@ -202,7 +202,7 @@ XML;
|
||||
AND nleft >= '.$limits['nleft'].'
|
||||
AND nright <= '.$limits['nright'].'
|
||||
ORDER BY cl.id_category, cl.id_lang ASC';
|
||||
$categories = Db::getInstance()->ExecuteS($sql);
|
||||
$categories = Db::getInstance()->executeS($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -211,7 +211,7 @@ XML;
|
||||
WHERE nleft >= '.$limits['nleft'].'
|
||||
AND nright <= '.$limits['nright'].'
|
||||
ORDER BY c.id_category ASC';
|
||||
$categories = Db::getInstance()->ExecuteS($sql);
|
||||
$categories = Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
foreach($categories as $category)
|
||||
@@ -241,7 +241,7 @@ XML;
|
||||
AND ps.id_shop = '.$shopID.'
|
||||
'.(Configuration::get('GSITEMAP_ALL_PRODUCTS') ? '' : 'HAVING level_depth IS NOT NULL').'
|
||||
ORDER BY pl.id_product, pl.id_lang ASC';
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
$tmp = null;
|
||||
$res = null;
|
||||
|
||||
+11
-11
@@ -54,7 +54,7 @@ class Hipay extends PaymentModule
|
||||
ON z.id_zone = c.id_zone
|
||||
WHERE ';
|
||||
|
||||
$result = Db::getInstance()->ExecuteS($request.$this->getRequestZones());
|
||||
$result = Db::getInstance()->executeS($request.$this->getRequestZones());
|
||||
|
||||
foreach ($result as $num => $iso)
|
||||
$this->limited_countries[] = $iso['iso_code'];
|
||||
@@ -82,7 +82,7 @@ class Hipay extends PaymentModule
|
||||
if (!(parent::install() AND $this->registerHook('payment')))
|
||||
return false;
|
||||
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_zone`, `name`
|
||||
FROM `'._DB_PREFIX_.'zone`
|
||||
WHERE `active` = 1
|
||||
@@ -93,7 +93,7 @@ class Hipay extends PaymentModule
|
||||
Configuration::deleteByName('HIPAY_AZ_'.$rowValues['id_zone']);
|
||||
Configuration::deleteByName('HIPAY_AZ_ALL_'.$rowValues['id_zone']);
|
||||
}
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class Hipay extends PaymentModule
|
||||
*/
|
||||
private function getRequestZones($searchField='z.id_zone', $defaultZone = 1)
|
||||
{
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_zone`, `name`
|
||||
FROM `'._DB_PREFIX_.'zone`
|
||||
WHERE `active` = 1
|
||||
@@ -309,7 +309,7 @@ class Hipay extends PaymentModule
|
||||
{
|
||||
parent::uninstall();
|
||||
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_zone`, `name`
|
||||
FROM `'._DB_PREFIX_.'zone`
|
||||
WHERE `active` = 1
|
||||
@@ -320,14 +320,14 @@ class Hipay extends PaymentModule
|
||||
Configuration::deleteByName('HIPAY_AZ_'.$rowValues['id_zone']);
|
||||
Configuration::deleteByName('HIPAY_AZ_ALL_'.$rowValues['id_zone']);
|
||||
}
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$currencies = DB::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT c.iso_code, c.name, c.sign FROM '._DB_PREFIX_.'currency c');
|
||||
$currencies = DB::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT c.iso_code, c.name, c.sign FROM '._DB_PREFIX_.'currency c');
|
||||
|
||||
if (Tools::isSubmit('submitHipayAZ'))
|
||||
{
|
||||
@@ -340,7 +340,7 @@ class Hipay extends PaymentModule
|
||||
Configuration::updateValue('HIPAY_AZ_'.$id, 'ko');
|
||||
}
|
||||
}
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id);
|
||||
|
||||
// Add the new configuration zones
|
||||
foreach ($_POST as $key => $val)
|
||||
@@ -349,9 +349,9 @@ class Hipay extends PaymentModule
|
||||
Configuration::updateValue($key, 'ok');
|
||||
}
|
||||
$request = 'SELECT id_country FROM '._DB_PREFIX_.'country WHERE ';
|
||||
$results = Db::getInstance()->ExecuteS($request.$this->getRequestZones('id_zone'));
|
||||
$results = Db::getInstance()->executeS($request.$this->getRequestZones('id_zone'));
|
||||
foreach ($results as $rowValues)
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'module_country VALUE('.(int)$this->id.', '.(int)$rowValues['id_country'].')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'module_country VALUE('.(int)$this->id.', '.(int)$rowValues['id_country'].')');
|
||||
|
||||
}
|
||||
elseif (Tools::isSubmit('submitHipay'))
|
||||
@@ -544,7 +544,7 @@ class Hipay extends PaymentModule
|
||||
</tr>
|
||||
';
|
||||
|
||||
$result = Db::getInstance()->ExecuteS('
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT `id_zone`, `name`
|
||||
FROM '._DB_PREFIX_.'zone
|
||||
WHERE `active` = 1
|
||||
|
||||
@@ -95,7 +95,7 @@ class HomeSlide extends ObjectModel
|
||||
$id_shop = $context->shop->getID();
|
||||
|
||||
$res = parent::add($autodate, $nullValues);
|
||||
$res &= Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
$res &= Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'homeslider` (`id_shop`, `id_slide`)
|
||||
VALUES('.(int)$id_shop.', '.(int)$this->id.')'
|
||||
);
|
||||
@@ -113,7 +113,7 @@ class HomeSlide extends ObjectModel
|
||||
}
|
||||
|
||||
$res &= $this->reOrderPositions();
|
||||
$res &= Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
$res &= Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'homeslider`
|
||||
WHERE `id_slide` = '.(int)$this->id
|
||||
);
|
||||
@@ -128,7 +128,7 @@ class HomeSlide extends ObjectModel
|
||||
$context = Context::getContext();
|
||||
$id_shop = $context->shop->getID();
|
||||
|
||||
$max = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT MAX(hss.`position`) as position
|
||||
FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs
|
||||
WHERE hss.`id_slide` = hs.`id_slide` AND hs.`id_shop` = '.(int)$id_shop
|
||||
@@ -137,7 +137,7 @@ class HomeSlide extends ObjectModel
|
||||
if ((int)$max == (int)$id_slide)
|
||||
return true;
|
||||
|
||||
$rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT hss.`position` as position, hss.`id_slide` as id_slide
|
||||
FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs
|
||||
WHERE hss.`id_slide` = hs.`id_slide` AND hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position
|
||||
|
||||
@@ -42,7 +42,7 @@ if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('slid
|
||||
|
||||
foreach ($slides as $position => $id_slide)
|
||||
{
|
||||
$res = Db::getInstance()->Execute('
|
||||
$res = Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'homeslider_slides` SET `position` = '.(int)($position).'
|
||||
WHERE `id_slide` = '.(int)($id_slide)
|
||||
);
|
||||
|
||||
@@ -85,7 +85,7 @@ class HomeSlider extends Module
|
||||
protected function createTables()
|
||||
{
|
||||
/* Slides */
|
||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
$res = Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider` (
|
||||
`id_slide` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_shop` int(10) unsigned NOT NULL,
|
||||
@@ -94,7 +94,7 @@ class HomeSlider extends Module
|
||||
');
|
||||
|
||||
/* Slides configuration */
|
||||
$res &= Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
$res &= Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides` (
|
||||
`id_slide` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`position` int(10) unsigned NOT NULL DEFAULT \'0\',
|
||||
@@ -104,7 +104,7 @@ class HomeSlider extends Module
|
||||
');
|
||||
|
||||
/* Slides lang configuration */
|
||||
$res &= Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
$res &= Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides_lang` (
|
||||
`id_slide` int(10) unsigned NOT NULL,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
@@ -128,7 +128,7 @@ class HomeSlider extends Module
|
||||
$to_del = new HomeSlide($slide['id_slide']);
|
||||
$to_del->delete();
|
||||
}
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DROP TABLE `'._DB_PREFIX_.'homeslider`, `'._DB_PREFIX_.'homeslider_slides`, `'._DB_PREFIX_.'homeslider_slides_lang`;
|
||||
');
|
||||
}
|
||||
@@ -629,7 +629,7 @@ class HomeSlider extends Module
|
||||
$idShop = $this->context->shop->getID();
|
||||
$idLang = $this->context->language->id;
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT hs.`id_slide` AS id_slide, hssl.`image` as image, hss.`position` AS position, hss.`active` as active, hssl.`title` as title, hssl.`url` as url, hssl.`legend` as legend
|
||||
FROM `'._DB_PREFIX_.'homeslider` hs, `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider_slides_lang` hssl
|
||||
WHERE hs.`id_shop` = '.(int)$idShop.((int)$idShop != 0 ? ' OR hs.`id_shop` = 0' : '').' AND hs.`id_slide` = hss.`id_slide` AND hss.`id_slide` = hssl.`id_slide` AND hs.`id_slide` = hssl.`id_slide`
|
||||
|
||||
@@ -61,8 +61,8 @@ class importerosc extends ImportModule
|
||||
|
||||
public function displaySpecificOptions()
|
||||
{
|
||||
$langagues = $this->ExecuteS('SELECT * FROM `'.bqSQL($this->prefix).'languages`');
|
||||
$curencies = $this->ExecuteS('SELECT * FROM `'.bqSQL($this->prefix).'currencies`');
|
||||
$langagues = $this->executeS('SELECT * FROM `'.bqSQL($this->prefix).'languages`');
|
||||
$curencies = $this->executeS('SELECT * FROM `'.bqSQL($this->prefix).'currencies`');
|
||||
|
||||
$html = '<label style=\'width:220px\'>'.$this->l('Default osCommerce language : ').'</label>
|
||||
<div class="margin-form">
|
||||
@@ -115,14 +115,14 @@ class importerosc extends ImportModule
|
||||
public function getLangagues($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_lang';
|
||||
$langagues = $this->ExecuteS('SELECT languages_id as id_lang, name as name, code as iso_code, 1 as active FROM `'.bqSQL($this->prefix).'languages` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
$langagues = $this->executeS('SELECT languages_id as id_lang, name as name, code as iso_code, 1 as active FROM `'.bqSQL($this->prefix).'languages` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
return $this->autoFormat($langagues, $identifier);
|
||||
}
|
||||
|
||||
public function getCurrencies($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_currency';
|
||||
$currencies = $this->ExecuteS('
|
||||
$currencies = $this->executeS('
|
||||
SELECT currencies_id as id_currency, title as name, code as iso_code, 0 as format, 999 as iso_code_num, 1 as decimals,
|
||||
CONCAT(`symbol_left`, `symbol_right`) as sign, value as conversion_rate
|
||||
FROM `'.bqSQL($this->prefix).'currencies` LIMIT '.(int)($limit).' , '.(int)$nrb_import
|
||||
@@ -133,7 +133,7 @@ class importerosc extends ImportModule
|
||||
public function getZones($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_zone';
|
||||
$zones = $this->ExecuteS('SELECT geo_zone_id as id_zone, geo_zone_name as name, 1 as active FROM `'.bqSQL($this->prefix).'geo_zones` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
$zones = $this->executeS('SELECT geo_zone_id as id_zone, geo_zone_name as name, 1 as active FROM `'.bqSQL($this->prefix).'geo_zones` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
return $this->autoFormat($zones, $identifier);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class importerosc extends ImportModule
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_country';
|
||||
$defaultIdLang = $this->getDefaultIdLang();
|
||||
$countries = $this->ExecuteS('
|
||||
$countries = $this->executeS('
|
||||
SELECT countries_id as id_country, countries_name as name, countries_iso_code_2 as iso_code, `'.bqSQL($defaultIdLang).'̀ as id_lang,
|
||||
1 as id_zone, 0 as id_currency, 1 as contains_states, 1 as need_identification_number, 1 as active, 1 as display_tax_label
|
||||
FROM `'.bqSQL($this->prefix).'countries` as c LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
@@ -181,7 +181,7 @@ class importerosc extends ImportModule
|
||||
{
|
||||
$genderMatch = array('m' => 1,'f' => 2);
|
||||
$identifier = 'id_customer';
|
||||
$customers = $this->ExecuteS('
|
||||
$customers = $this->executeS('
|
||||
SELECT c.`customers_id` as id_customer, 1 as id_default_group, c.`customers_gender` as id_gender, c.`customers_firstname` as firstname,
|
||||
IFNULL( STRCMP(c.`customers_newsletter`, \'\') , 0 ) as newsletter, c.`customers_lastname` as lastname,
|
||||
DATE(c.`customers_dob`) as birthday, c.`customers_email_address` as email, c.`customers_password` as passwd, 1 as active,
|
||||
@@ -203,7 +203,7 @@ class importerosc extends ImportModule
|
||||
public function getAddresses($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_address';
|
||||
$addresses = $this->ExecuteS('
|
||||
$addresses = $this->executeS('
|
||||
SELECT address_book_id as id_address, customers_id as id_customer, CONCAT(customers_id, \'_address\') as alias, entry_company as company, entry_firstname as firstname,
|
||||
entry_lastname as lastname, entry_street_address as address1, entry_postcode as postcode, entry_city as city, entry_country_id as id_country, 0 as id_state
|
||||
FROM `'.bqSQL($this->prefix).'address_book` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
@@ -216,7 +216,7 @@ class importerosc extends ImportModule
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_category';
|
||||
|
||||
$categories = $this->ExecuteS('
|
||||
$categories = $this->executeS('
|
||||
SELECT c.categories_id as id_category, c.parent_id as id_parent, 0 as level_depth, cd.language_id as id_lang, cd.categories_name as name , 1 as active, categories_image as images
|
||||
FROM `'.bqSQL($this->prefix).'categories` c
|
||||
LEFT JOIN `'.bqSQL($this->prefix).'categories_description` cd ON (c.categories_id = cd.categories_id)
|
||||
@@ -236,7 +236,7 @@ class importerosc extends ImportModule
|
||||
$multiLangFields = array('name', 'public_name');
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_attribute_group';
|
||||
$countries = $this->ExecuteS('
|
||||
$countries = $this->executeS('
|
||||
SELECT products_options_id as id_attribute_group, products_options_name as name , products_options_name as public_name, language_id as id_lang, 0 as is_color_group
|
||||
FROM `'.bqSQL($this->prefix).'products_options`
|
||||
LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
@@ -248,7 +248,7 @@ class importerosc extends ImportModule
|
||||
$multiLangFields = array('name');
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_attribute';
|
||||
$countries = $this->ExecuteS('
|
||||
$countries = $this->executeS('
|
||||
SELECT p.`products_options_values_id` as id_attribute, p.`products_options_values_name` as name, p.`language_id` as id_lang , po.`products_options_id` as id_attribute_group
|
||||
FROM `'.bqSQL($this->prefix).'products_options_values` p
|
||||
LEFT JOIN `'.bqSQL($this->prefix).'products_options_values_to_products_options` po ON (po.products_options_values_id = p.products_options_values_id)
|
||||
@@ -261,7 +261,7 @@ class importerosc extends ImportModule
|
||||
$multiLangFields = array('name', 'link_rewrite', 'description');
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_product';
|
||||
$products = $this->ExecuteS('
|
||||
$products = $this->executeS('
|
||||
SELECT p.`products_id` as id_product, p.`products_quantity` as quantity, p.`products_model` as reference, p.`products_price` as price, p.`products_weight` as weight,
|
||||
IFNULL(STRCMP(p.`products_status`, \'\') , 0 ) as active, p.`manufacturers_id` as id_manufacturer, pd.language_id as id_lang, pd.products_name as name,
|
||||
pd.products_description as description, CONCAT(\''.pSQL(Tools::getProtocol()).pSQL(Tools::getValue('shop_url')).'\/images/\',p.`products_image`) as images,
|
||||
@@ -283,7 +283,7 @@ class importerosc extends ImportModule
|
||||
)');
|
||||
foreach($products as& $product)
|
||||
{
|
||||
$result = $this->ExecuteS('SELECT `image` FROM `'.bqSQL($this->prefix).'products_images` WHERE products_id = '.(int)$product['id_product']);
|
||||
$result = $this->executeS('SELECT `image` FROM `'.bqSQL($this->prefix).'products_images` WHERE products_id = '.(int)$product['id_product']);
|
||||
$images = array();
|
||||
foreach($result as $res)
|
||||
$images[] = Tools::getProtocol().Tools::getValue('shop_url').'/images/'.$res['image'];
|
||||
@@ -297,7 +297,7 @@ class importerosc extends ImportModule
|
||||
public function getProductsCombination($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_product_attribute';
|
||||
$combinations = $this->ExecuteS('
|
||||
$combinations = $this->executeS('
|
||||
SELECT products_attributes_id as id_product_attribute, products_id as id_product, options_values_price as price, options_values_id
|
||||
FROM `'.bqSQL($this->prefix).'products_attributes` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
foreach($combinations as& $combination)
|
||||
@@ -311,7 +311,7 @@ class importerosc extends ImportModule
|
||||
public function getManufacturers($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$identifier = 'id_manufacturer';
|
||||
$manufacturers = $this->ExecuteS('
|
||||
$manufacturers = $this->executeS('
|
||||
SELECT manufacturers_id as id_manufacturer, manufacturers_name as name, 1 as active, manufacturers_image as images
|
||||
FROM `'.bqSQL($this->prefix).'manufacturers` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
foreach($manufacturers as& $manufacturer)
|
||||
@@ -325,7 +325,7 @@ class importerosc extends ImportModule
|
||||
$multiLangFields = array('name');
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_order_state';
|
||||
$ordersStates = $this->ExecuteS('
|
||||
$ordersStates = $this->executeS('
|
||||
SELECT `orders_status_id` as id_order_state, `language_id` as id_lang, `orders_status_name` as name , 1 as hidden
|
||||
FROM `'.bqSQL($this->prefix).'orders_status`
|
||||
LIMIT '.(int)($limit).' , '.(int)$nrb_import);//IF(`public_flag` = 0, 1, 0) as hidden
|
||||
@@ -335,7 +335,7 @@ class importerosc extends ImportModule
|
||||
public function getOrders($limit = 0, $nrb_import = 100)
|
||||
{
|
||||
$orders = array();
|
||||
$addresses = $this->ExecuteS('SELECT customers_id as id_customer, address_book_id as id_address FROM `'.bqSQL($this->prefix).'address_book` GROUP BY customers_id');
|
||||
$addresses = $this->executeS('SELECT customers_id as id_customer, address_book_id as id_address FROM `'.bqSQL($this->prefix).'address_book` GROUP BY customers_id');
|
||||
$matchAddresses = array();
|
||||
foreach($addresses as $address)
|
||||
$matchAddresses[$address['id_customer']] = $address['id_address'];
|
||||
@@ -348,7 +348,7 @@ class importerosc extends ImportModule
|
||||
unset($psCurrency[$key]);
|
||||
}
|
||||
|
||||
$orders = $this->ExecuteS('
|
||||
$orders = $this->executeS('
|
||||
SELECT orders_id as id_cart, '.$psCarrierDefault.' as id_carrier, 1 as id_lang, currency as id_currency, customers_id as id_customer, payment_method as payment, 1 as valid,
|
||||
date_purchased as date_add, last_modified as date_upd
|
||||
FROM `'.bqSQL($this->prefix).'orders` LIMIT '.(int)($limit).' , '.(int)$nrb_import);
|
||||
@@ -365,14 +365,14 @@ class importerosc extends ImportModule
|
||||
$orders[$key]['total_shipping'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_shipping\'');
|
||||
$orders[$key]['total_discounts'] = 0;
|
||||
$orders[$key]['total_wrapping'] = 0;
|
||||
$orders[$key]['cart_products'] = $this->ExecuteS('
|
||||
$orders[$key]['cart_products'] = $this->executeS('
|
||||
SELECT `orders_id` as id_cart, `products_id` as id_product, 0 as id_product_attribute, `products_quantity` as quantity
|
||||
FROM `'.bqSQL($this->prefix).'orders_products` WHERE `orders_id` = '.(int)$order['id_cart']);
|
||||
$orders[$key]['order_products'] = $this->ExecuteS('
|
||||
$orders[$key]['order_products'] = $this->executeS('
|
||||
SELECT `orders_id` as id_order, `products_id` as product_id, 0 as product_attribute_id, `products_name` as product_name, `products_quantity` as product_quantity,
|
||||
`final_price` as product_price, 0 as product_weight
|
||||
FROM `'.bqSQL($this->prefix).'orders_products` WHERE `orders_id` = '.(int)$order['id_cart']);
|
||||
$orders[$key]['order_history'] = $this->ExecuteS('
|
||||
$orders[$key]['order_history'] = $this->executeS('
|
||||
SELECT `orders_status_history_id` as id_order_history, 0 as id_employee, `orders_id` as id_order, `orders_status_id` as id_order_state, `date_added` as date_add
|
||||
FROM `'.bqSQL($this->prefix).'orders_status_history` WHERE `orders_id` = '.(int)$order['id_cart']);
|
||||
|
||||
@@ -411,7 +411,7 @@ class importerosc extends ImportModule
|
||||
if($this->checkPwd($passwd, $result['passwd_'.pSQL($this->name)]))
|
||||
{
|
||||
$ps_passwd = md5(pSQL(_COOKIE_KEY_.$passwd));
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'customer`
|
||||
SET `passwd` = \''.pSQL($ps_passwd).'\', `passwd_'.bqSQL($this->name).'` = \'\'
|
||||
WHERE `'._DB_PREFIX_.'customer`.`id_customer` ='.(int)$result['id_customer'].' LIMIT 1');
|
||||
|
||||
@@ -169,7 +169,7 @@ class LoyaltyModule extends ObjectModel
|
||||
$query .= ' GROUP BY f.id_loyalty '.
|
||||
($pagination ? 'LIMIT '.(((int)($page) - 1) * (int)($nb)).', '.(int)($nb) : '');
|
||||
|
||||
return Db::getInstance()->ExecuteS($query);
|
||||
return Db::getInstance()->executeS($query);
|
||||
}
|
||||
|
||||
public static function getDiscountByIdCustomer($id_customer, $last=false)
|
||||
@@ -185,7 +185,7 @@ class LoyaltyModule extends ObjectModel
|
||||
$query.= ' ORDER BY f.id_loyalty DESC LIMIT 0,1';
|
||||
$query.= ' GROUP BY f.id_discount';
|
||||
|
||||
return Db::getInstance()->ExecuteS($query);
|
||||
return Db::getInstance()->executeS($query);
|
||||
}
|
||||
|
||||
public static function registerDiscount($discount)
|
||||
@@ -211,7 +211,7 @@ class LoyaltyModule extends ObjectModel
|
||||
|
||||
public static function getOrdersByIdDiscount($id_discount)
|
||||
{
|
||||
$items = Db::getInstance()->ExecuteS('
|
||||
$items = Db::getInstance()->executeS('
|
||||
SELECT f.id_order AS id_order, f.points AS points, f.date_upd AS date
|
||||
FROM `'._DB_PREFIX_.'loyalty` f
|
||||
WHERE f.id_discount = '.(int)($id_discount).' AND f.id_loyalty_state = '.(int)(LoyaltyStateModule::getConvertId()));
|
||||
@@ -235,7 +235,7 @@ class LoyaltyModule extends ObjectModel
|
||||
/* Register all transaction in a specific history table */
|
||||
private function historize()
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'loyalty_history` (`id_loyalty`, `id_loyalty_state`, `points`, `date_add`)
|
||||
VALUES ('.(int)($this->id).', '.(int)($this->id_loyalty_state).', '.(int)($this->points).', NOW())');
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class Loyalty extends Module
|
||||
|
||||
function installDB()
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'loyalty` (
|
||||
`id_loyalty` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_loyalty_state` INT UNSIGNED NOT NULL DEFAULT 1,
|
||||
@@ -115,7 +115,7 @@ class Loyalty extends Module
|
||||
INDEX index_loyalty_customer (`id_customer`)
|
||||
) DEFAULT CHARSET=utf8 ;');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'loyalty_history` (
|
||||
`id_loyalty_history` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_loyalty` INT UNSIGNED DEFAULT NULL,
|
||||
@@ -127,7 +127,7 @@ class Loyalty extends Module
|
||||
INDEX `index_loyalty_history_loyalty_state` (`id_loyalty_state`)
|
||||
) DEFAULT CHARSET=utf8 ;');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'loyalty_state` (
|
||||
`id_loyalty_state` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_order_state` INT UNSIGNED DEFAULT NULL,
|
||||
@@ -135,7 +135,7 @@ class Loyalty extends Module
|
||||
INDEX index_loyalty_state_order_state (`id_order_state`)
|
||||
) DEFAULT CHARSET=utf8 ;');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'loyalty_state_lang` (
|
||||
`id_loyalty_state` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_lang` INT UNSIGNED NOT NULL,
|
||||
@@ -157,10 +157,10 @@ class Loyalty extends Module
|
||||
|
||||
function uninstallDB()
|
||||
{
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'loyalty`;');
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state`;');
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state_lang`;');
|
||||
Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'loyalty_history`;');
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty`;');
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state`;');
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state_lang`;');
|
||||
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_history`;');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ if (!Context::getContext()->customer->isLogged())
|
||||
|
||||
$id_customer = (int)Db::getInstance()->getValue('SELECT id_customer FROM '._DB_PREFIX_.'customer WHERE email=\''.pSQL($customer_email).'\' AND is_guest=0');
|
||||
// Check if already in DB
|
||||
if (Db::getInstance()->ExecuteS('
|
||||
if (Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
@@ -57,7 +57,7 @@ else
|
||||
$customer_email = 0;
|
||||
}
|
||||
|
||||
if (Db::getInstance()->Execute('
|
||||
if (Db::getInstance()->execute('
|
||||
REPLACE INTO `'._DB_PREFIX_.'mailalert_customer_oos` (`id_customer`, `customer_email`, `id_product` , `id_product_attribute`)
|
||||
VALUES ('.(int)($id_customer).', \''.pSQL($customer_email).'\', '.(int)($id_product).', '.(int)($id_product_attribute).')'))
|
||||
die ('1');
|
||||
|
||||
@@ -77,7 +77,7 @@ class MailAlerts extends Module
|
||||
Configuration::updateValue('MA_MERCHANT_MAILS', Configuration::get('PS_SHOP_EMAIL'));
|
||||
Configuration::updateValue('MA_LAST_QTIES', Configuration::get('PS_LAST_QTIES'));
|
||||
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'mailalert_customer_oos` (
|
||||
`id_customer` int(10) unsigned NOT NULL,
|
||||
`customer_email` varchar(128) NOT NULL,
|
||||
@@ -100,7 +100,7 @@ class MailAlerts extends Module
|
||||
Configuration::deleteByName('MA_CUSTOMER_QTY');
|
||||
Configuration::deleteByName('MA_MERCHANT_MAILS');
|
||||
Configuration::deleteByName('MA_LAST_QTIES');
|
||||
if (!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'mailalert_customer_oos'))
|
||||
if (!Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'mailalert_customer_oos'))
|
||||
return false;
|
||||
return parent::uninstall();
|
||||
}
|
||||
@@ -276,7 +276,7 @@ class MailAlerts extends Module
|
||||
|
||||
public function customerHasNotification($id_customer, $id_product, $id_product_attribute)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
@@ -336,7 +336,7 @@ class MailAlerts extends Module
|
||||
|
||||
public function sendCustomerAlert($id_product, $id_product_attribute)
|
||||
{
|
||||
$customers = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$customers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT id_customer, customer_email
|
||||
FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute);
|
||||
@@ -498,7 +498,7 @@ class MailAlerts extends Module
|
||||
'.Product::sqlStock('p', 0).'
|
||||
WHERE p.`active` = 1
|
||||
ma.`id_customer` = '.$id_customer;
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
if (empty($products) === true OR !sizeof($products))
|
||||
return array();
|
||||
@@ -511,7 +511,7 @@ class MailAlerts extends Module
|
||||
if (isset($products[$i]['id_product_attribute']) AND
|
||||
Validate::isUnsignedInt($products[$i]['id_product_attribute']))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT al.`name` AS attribute_name
|
||||
FROM `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
@@ -555,7 +555,7 @@ class MailAlerts extends Module
|
||||
|
||||
public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute)
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
AND `customer_email` = \''.pSQL($customer_email).'\'
|
||||
@@ -565,16 +565,16 @@ class MailAlerts extends Module
|
||||
|
||||
public function hookDeleteProduct($params)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos` WHERE `id_product` = '.(int)$params['product']->id);
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos` WHERE `id_product` = '.(int)$params['product']->id);
|
||||
}
|
||||
|
||||
public function hookDeleteProductAttribute($params)
|
||||
{
|
||||
if ($params['deleteAllAttributes'])
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_product` = '.(int)$params['id_product']);
|
||||
else
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'mailalert_customer_oos`
|
||||
WHERE `id_product_attribute` = '.(int)$params['id_product_attribute'].'
|
||||
AND `id_product` = '.(int)$params['id_product']);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ class AdminMondialRelay extends AdminTab
|
||||
$mondialrelay = new MondialRelay();
|
||||
$_html = '';
|
||||
$query = "SELECT * FROM `" . _DB_PREFIX_ ."mr_historique` ORDER BY `id` DESC ;";
|
||||
$query = Db::getInstance()->ExecuteS($query);
|
||||
$query = Db::getInstance()->executeS($query);
|
||||
|
||||
$_html.= '
|
||||
<fieldset>
|
||||
|
||||
@@ -410,7 +410,7 @@ class MRCreateTickets implements IMondialRelayWSMethod
|
||||
*/
|
||||
private function _updateTable($params, $expeditionNum, $ticketURL, $trackingURL, $id_mr_selected)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'mr_selected`
|
||||
SET `MR_poids` = \''.pSQL($params['Poids']).'\',
|
||||
`exp_number` = \''.pSQL($expeditionNum).'\',
|
||||
|
||||
@@ -166,7 +166,7 @@ class MRGetTickets implements IMondialRelayWSMethod
|
||||
\''.pSQL((string)$URLA4).'\',
|
||||
\''.pSQL((string)$URLA5).'\')';
|
||||
}
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
$success['id_mr_history'] = isset($row['id']) ? $row['id'] : Db::getInstance()->Insert_ID();
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class MRManagement extends MondialRelay
|
||||
$query .= '"'.pSQL($value).'", ';
|
||||
$query = rtrim($query, ', ').')';
|
||||
}
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
}
|
||||
|
||||
public function uninstallDetail()
|
||||
@@ -143,7 +143,7 @@ class MRManagement extends MondialRelay
|
||||
$query = trim($query, ', ').')';
|
||||
|
||||
$success['deletedListId'] = $this->_params['historyIdList'];
|
||||
$totalDeleted = Db::getInstance()->Execute($query);
|
||||
$totalDeleted = Db::getInstance()->execute($query);
|
||||
if (count($success['deletedListId']) != $totalDeleted)
|
||||
{
|
||||
$error[] = $this->l('Some items can\'t be removed, please try to remove it again');
|
||||
|
||||
@@ -31,7 +31,7 @@ include_once('mondialrelay.php');
|
||||
if (Tools::getValue('secure_key') != Configuration::get('MONDIAL_RELAY_SECURE_KEY'))
|
||||
exit;
|
||||
|
||||
$expeditions = Db::getInstance()->ExecuteS('
|
||||
$expeditions = Db::getInstance()->executeS('
|
||||
SELECT ms.`exp_number`, ms.`id_cart`, o.`id_order`
|
||||
FROM `'._DB_PREFIX_.'mr_selected` ms
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_cart` = ms.`id_cart`)
|
||||
|
||||
@@ -81,14 +81,14 @@ class MondialRelay extends Module
|
||||
if (!parent::install())
|
||||
return false;
|
||||
|
||||
Db::getInstance()->ExecuteS(
|
||||
Db::getInstance()->executeS(
|
||||
'SELECT `name`
|
||||
FROM `' . _DB_PREFIX_ . 'hook`
|
||||
WHERE `name` = \''.$name.'\'
|
||||
AND `title` = \''.$title.'\'');
|
||||
|
||||
if (!Db::getInstance()->NumRows())
|
||||
Db::getInstance()->Execute('INSERT INTO ' . _DB_PREFIX_ . 'hook
|
||||
Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'hook
|
||||
(name, title, description, position)
|
||||
VALUES(\''.$name.'\', \''.$title.'\', NULL, 0)');
|
||||
|
||||
@@ -103,7 +103,7 @@ class MondialRelay extends Module
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
foreach($sql AS $k => $query)
|
||||
if (!empty($query))
|
||||
Db::getInstance()->Execute(trim($query));
|
||||
Db::getInstance()->execute(trim($query));
|
||||
|
||||
$result = Db::getInstance()->getRow('
|
||||
SELECT id_tab
|
||||
@@ -121,7 +121,7 @@ class MondialRelay extends Module
|
||||
|
||||
$pos = (isset($result['position'])) ? $result['position'] + 1 : 0;
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO ' . _DB_PREFIX_ . 'tab
|
||||
(id_parent, class_name, position, module)
|
||||
VALUES(3, "AdminMondialRelay", "'.(int)($pos).'", "mondialrelay")');
|
||||
@@ -130,14 +130,14 @@ class MondialRelay extends Module
|
||||
|
||||
$languages = Language::getLanguages();
|
||||
foreach ($languages as $language)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO ' . _DB_PREFIX_ . 'tab_lang
|
||||
(id_lang, id_tab, name)
|
||||
VALUES("'.(int)($language['id_lang']).'", "'.(int)($id_tab).'", "Mondial Relay")');
|
||||
|
||||
$profiles = Profile::getProfiles(Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($profiles as $profile)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO ' . _DB_PREFIX_ . 'access
|
||||
(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`)
|
||||
VALUES('.$profile['id_profile'].', '.(int)($id_tab).', 1, 1, 1, 1)');
|
||||
@@ -162,7 +162,7 @@ class MondialRelay extends Module
|
||||
else
|
||||
{
|
||||
// Reactive transport if database wasn't remove at the last uninstall
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'carrier` c, `'._DB_PREFIX_.'mr_method` m
|
||||
SET `deleted` = 0
|
||||
WHERE c.id_carrier = m.id_carrier');
|
||||
@@ -215,19 +215,19 @@ class MondialRelay extends Module
|
||||
$id_tab = $result['id_tab'];
|
||||
if (isset($id_tab) && !empty($id_tab))
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'tab WHERE id_tab = '.(int)($id_tab));
|
||||
Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'tab_lang WHERE id_tab = '.(int)($id_tab));
|
||||
Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'access WHERE id_tab = '.(int)($id_tab));
|
||||
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'tab WHERE id_tab = '.(int)($id_tab));
|
||||
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'tab_lang WHERE id_tab = '.(int)($id_tab));
|
||||
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'access WHERE id_tab = '.(int)($id_tab));
|
||||
}
|
||||
}
|
||||
|
||||
if (_PS_VERSION_ >= '1.4' &&
|
||||
!Db::getInstance()->Execute('
|
||||
!Db::getInstance()->execute('
|
||||
UPDATE '._DB_PREFIX_ .'carrier
|
||||
SET `active` = 0, `deleted` = 1
|
||||
WHERE `external_module_name` = "mondialrelay"'))
|
||||
return false;
|
||||
else if (!Db::getInstance()->Execute('
|
||||
else if (!Db::getInstance()->execute('
|
||||
UPDATE '._DB_PREFIX_ .'carrier
|
||||
SET `active` = 0, `deleted` = 1
|
||||
WHERE `name` = "mondialrelay"'))
|
||||
@@ -270,13 +270,13 @@ class MondialRelay extends Module
|
||||
return false;
|
||||
|
||||
// Drop databases
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
DROP TABLE
|
||||
'._DB_PREFIX_ .'mr_historique,
|
||||
'._DB_PREFIX_ .'mr_method,
|
||||
'._DB_PREFIX_ .'mr_selected'))
|
||||
return false;
|
||||
else if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'carrier SET `active` = 0, `deleted` = 1 WHERE `name` = "mondialrelay"'))
|
||||
else if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'carrier SET `active` = 0, `deleted` = 1 WHERE `name` = "mondialrelay"'))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -313,7 +313,7 @@ class MondialRelay extends Module
|
||||
*/
|
||||
private function _update_v1_4()
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'carrier`
|
||||
SET
|
||||
`shipping_external` = 0,
|
||||
@@ -552,7 +552,7 @@ class MondialRelay extends Module
|
||||
FROM `'._DB_PREFIX_.'mr_method`
|
||||
WHERE `id_carrier` = '.(int)($params['id_carrier']));
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'mr_method`
|
||||
(mr_Name, mr_Pays_list, mr_ModeCol, mr_ModeLiv, mr_ModeAss, id_carrier)
|
||||
VALUES (
|
||||
@@ -572,7 +572,7 @@ class MondialRelay extends Module
|
||||
{
|
||||
// Query don't use the external_module_name to keep the
|
||||
// 1.3 compatibility
|
||||
$carriers = Db::getInstance()->ExecuteS('
|
||||
$carriers = Db::getInstance()->executeS('
|
||||
SELECT
|
||||
c.id_carrier,
|
||||
c.range_behavior,
|
||||
@@ -707,7 +707,7 @@ class MondialRelay extends Module
|
||||
public function mrDelete($id)
|
||||
{
|
||||
$id = Db::getInstance()->getValue('SELECT `id_carrier` FROM `'._DB_PREFIX_ .'mr_method` WHERE `id_mr_method` = "'.(int)($id).'"');
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_ .'carrier` SET `active` = 0, `deleted` = 1 WHERE `id_carrier` = "'.(int)($id).'"');
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_ .'carrier` SET `active` = 0, `deleted` = 1 WHERE `id_carrier` = "'.(int)($id).'"');
|
||||
$this->_html .= '<div class="conf confirm"><img src="'._PS_ADMIN_IMG_.'/ok.gif" /> '.$this->l('Delete successful').'</div>';
|
||||
}
|
||||
|
||||
@@ -728,7 +728,7 @@ class MondialRelay extends Module
|
||||
{
|
||||
$key = explode(',', $Key);
|
||||
$id = Db::getInstance()->getValue('SELECT `id_carrier` FROM `'._DB_PREFIX_ .'mr_method` WHERE `id_mr_method` = "'.(int)($key[0]).'"');
|
||||
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'carrier SET active = "'.(int)($value).'" WHERE `id_carrier` = "'.(int)($id).'"');
|
||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'carrier SET active = "'.(int)($value).'" WHERE `id_carrier` = "'.(int)($id).'"');
|
||||
}
|
||||
}
|
||||
else if ($type == 'addShipping')
|
||||
@@ -753,11 +753,11 @@ class MondialRelay extends Module
|
||||
}
|
||||
$query .= ')';
|
||||
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
|
||||
$mainInsert = Db::getInstance()->Insert_ID();
|
||||
$default = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "configuration WHERE name = 'PS_CARRIER_DEFAULT'");
|
||||
$check = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "carrier");
|
||||
$default = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "configuration WHERE name = 'PS_CARRIER_DEFAULT'");
|
||||
$check = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "carrier");
|
||||
$checkD = array();
|
||||
|
||||
foreach($check AS $Key)
|
||||
@@ -769,40 +769,40 @@ class MondialRelay extends Module
|
||||
|
||||
// Added for 1.3 compatibility to match with the right key
|
||||
if (_PS_VERSION_ >= '1.4')
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `' . _DB_PREFIX_ . 'carrier`
|
||||
(`id_tax_rules_group`, `url`, `name`, `active`, `is_module`, `range_behavior`, `shipping_external`, `need_range`, `external_module_name`, `shipping_method`)
|
||||
VALUES("0", NULL, "'.pSQL($array[0]).'", "1", "1", "1", "0", "1", "mondialrelay", "1")');
|
||||
else
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `' . _DB_PREFIX_ . 'carrier`
|
||||
(`url`, `name`, `active`, `is_module`, `range_behavior`)
|
||||
VALUES(NULL, "'.pSQL('mondialrelay').'", "1", "0", "1")');
|
||||
|
||||
$get = Db::getInstance()->getRow('SELECT * FROM `' . _DB_PREFIX_ . 'carrier` WHERE `id_carrier` = "' . Db::getInstance()->Insert_ID() . '"');
|
||||
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'mr_method` SET `id_carrier` = "' . (int)($get['id_carrier']) . '" WHERE `id_mr_method` = "' . pSQL($mainInsert) . '"');
|
||||
Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'mr_method` SET `id_carrier` = "' . (int)($get['id_carrier']) . '" WHERE `id_mr_method` = "' . pSQL($mainInsert) . '"');
|
||||
$weight_coef = Configuration::get('MR_WEIGHT_COEF');
|
||||
$range_weight = array('24R' => array(0, 20000 / $weight_coef), 'DRI' => array(20000 / $weight_coef, 130000 / $weight_coef), 'LD1' => array(0, 60000 / $weight_coef), 'LDS' => array(30000 / $weight_coef, 130000 / $weight_coef));
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'range_weight` (`id_carrier`, `delimiter1`, `delimiter2`)
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'range_weight` (`id_carrier`, `delimiter1`, `delimiter2`)
|
||||
VALUES ('.(int)($get['id_carrier']).', '.$range_weight[$array[2]][0].', '.$range_weight[$array[2]][1].')');
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'range_price` (`id_carrier`, `delimiter1`, `delimiter2`) VALUES ('.(int)($get['id_carrier']).', 0.000000, 10000.000000)');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'range_price` (`id_carrier`, `delimiter1`, `delimiter2`) VALUES ('.(int)($get['id_carrier']).', 0.000000, 10000.000000)');
|
||||
$groups = Group::getGroups(Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($groups as $group)
|
||||
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'carrier_group` (id_carrier, id_group) VALUES('.(int)($get['id_carrier']).', '.(int)($group['id_group']).')');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'carrier_group` (id_carrier, id_group) VALUES('.(int)($get['id_carrier']).', '.(int)($group['id_group']).')');
|
||||
|
||||
$zones = Zone::getZones();
|
||||
foreach ($zones as $zone)
|
||||
{
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'carrier_zone` (id_carrier, id_zone) VALUES('.(int)($get['id_carrier']).', '.(int)($zone['id_zone']).')');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'carrier_zone` (id_carrier, id_zone) VALUES('.(int)($get['id_carrier']).', '.(int)($zone['id_zone']).')');
|
||||
$range_price_id = Db::getInstance()->getValue('SELECT id_range_price FROM ' . _DB_PREFIX_ . 'range_price WHERE id_carrier = "'.(int)($get['id_carrier']).'"');
|
||||
$range_weight_id = Db::getInstance()->getValue('SELECT id_range_weight FROM ' . _DB_PREFIX_ . 'range_weight WHERE id_carrier = "'.(int)($get['id_carrier']).'"');
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', '.(int)($range_price_id).', NULL,'.(int)($zone['id_zone']).', 0.00)');
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', NULL, '.(int)($range_weight_id).','.(int)($zone['id_zone']).', 0.00)');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', '.(int)($range_price_id).', NULL,'.(int)($zone['id_zone']).', 0.00)');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', NULL, '.(int)($range_weight_id).','.(int)($zone['id_zone']).', 0.00)');
|
||||
}
|
||||
|
||||
if(!in_array($default[0]['value'], $checkD))
|
||||
$default = Db::getInstance()->ExecuteS("UPDATE " . _DB_PREFIX_ . "configuration SET value = '" . (int)($get['id_carrier']) . "' WHERE name = 'PS_CARRIER_DEFAULT'");
|
||||
$default = Db::getInstance()->executeS("UPDATE " . _DB_PREFIX_ . "configuration SET value = '" . (int)($get['id_carrier']) . "' WHERE name = 'PS_CARRIER_DEFAULT'");
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@@ -813,7 +813,7 @@ class MondialRelay extends Module
|
||||
|
||||
public function addMethodForm()
|
||||
{
|
||||
$zones = Db::getInstance()->ExecuteS("SELECT * FROM " . _DB_PREFIX_ . "zone WHERE active = 1");
|
||||
$zones = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "zone WHERE active = 1");
|
||||
$output = '
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" >
|
||||
<fieldset>
|
||||
@@ -879,7 +879,7 @@ class MondialRelay extends Module
|
||||
|
||||
public function shippingForm()
|
||||
{
|
||||
$query = Db::getInstance()->ExecuteS('
|
||||
$query = Db::getInstance()->executeS('
|
||||
SELECT m.*
|
||||
FROM `'._DB_PREFIX_.'mr_method` m
|
||||
JOIN `'._DB_PREFIX_.'carrier` c
|
||||
@@ -1077,7 +1077,7 @@ class MondialRelay extends Module
|
||||
public function displayInfoByCart($id_cart)
|
||||
{
|
||||
$html = '<p>';
|
||||
$simpleresul = Db::getInstance()->ExecuteS('
|
||||
$simpleresul = Db::getInstance()->executeS('
|
||||
SELECT * FROM ' . _DB_PREFIX_ . 'mr_selected
|
||||
WHERE id_cart='.(int)($id_cart));
|
||||
|
||||
@@ -1113,7 +1113,7 @@ class MondialRelay extends Module
|
||||
FROM '._DB_PREFIX_ .'mr_selected
|
||||
WHERE id_mr_selected=\''.(int)($shipping_number).'\';';
|
||||
|
||||
$settings = Db::getInstance()->ExecuteS($query);
|
||||
$settings = Db::getInstance()->executeS($query);
|
||||
|
||||
return $settings[0]['url_suivi'];
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ class MondialRelay extends Module
|
||||
if ($key == 'name')
|
||||
$key = 'mr_Name';
|
||||
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE ' . _DB_PREFIX_ . 'mr_method
|
||||
SET '.pSQL($key).'="'.pSQL($value).'"
|
||||
WHERE id_carrier=\''.(int)($id_carrier).'\' ; ');
|
||||
@@ -1231,7 +1231,7 @@ class MondialRelay extends Module
|
||||
$sql .= '
|
||||
GROUP BY o.`id_order`
|
||||
ORDER BY o.`date_add` ASC';
|
||||
return Db::getInstance()->ExecuteS($sql);
|
||||
return Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
public function getErrorCodeDetail($code)
|
||||
|
||||
@@ -147,7 +147,7 @@ class Newsletter extends Module
|
||||
AND a.`id_country` = '.(int)Tools::getValue('COUNTRY').') >= 1');
|
||||
|
||||
|
||||
$rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($dbquery->build());
|
||||
$rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($dbquery->build());
|
||||
|
||||
$header = array('id_customer', 'lastname', 'firstname', 'email', 'ip_address', 'newsletter_date_add');
|
||||
$result = (is_array($rq) ? array_merge(array($header), $rq) : $header);
|
||||
@@ -156,7 +156,7 @@ class Newsletter extends Module
|
||||
|
||||
private function _getBlockNewsletter()
|
||||
{
|
||||
$rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT `id`, `email`, `newsletter_date_add`, `ip_registration_newsletter`
|
||||
FROM `'._DB_PREFIX_.'newsletter`
|
||||
WHERE `active` = 1');
|
||||
|
||||
@@ -50,7 +50,7 @@ class Pagesnotfound extends Module
|
||||
{
|
||||
if (!parent::install() OR !$this->registerHook('top') OR !$this->registerHook('AdminStatsModules'))
|
||||
return false;
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'pagenotfound` (
|
||||
id_pagenotfound INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
id_shop INTEGER UNSIGNED NOT NULL DEFAULT \'1\',
|
||||
@@ -65,7 +65,7 @@ class Pagesnotfound extends Module
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
return (parent::uninstall() AND Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'pagenotfound`'));
|
||||
return (parent::uninstall() AND Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'pagenotfound`'));
|
||||
}
|
||||
|
||||
private function getPages()
|
||||
@@ -75,7 +75,7 @@ class Pagesnotfound extends Module
|
||||
WHERE date_add BETWEEN '.ModuleGraph::getDateBetween()
|
||||
.$this->sqlShopRestriction().
|
||||
'GROUP BY http_referer, request_uri';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
$pages = array();
|
||||
foreach ($result as $row)
|
||||
@@ -96,12 +96,12 @@ class Pagesnotfound extends Module
|
||||
{
|
||||
if (Tools::isSubmit('submitTruncatePNF'))
|
||||
{
|
||||
Db::getInstance()->Execute('TRUNCATE `'._DB_PREFIX_.'pagenotfound`');
|
||||
Db::getInstance()->execute('TRUNCATE `'._DB_PREFIX_.'pagenotfound`');
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('Pages not found has been emptied.').'</div>';
|
||||
}
|
||||
elseif (Tools::isSubmit('submitDeletePNF'))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'pagenotfound`
|
||||
WHERE date_add BETWEEN '.ModuleGraph::getDateBetween());
|
||||
$this->_html .= '<div class="conf confirm"><img src="../img/admin/ok.gif" /> '.$this->l('Pages not found have been deleted.').'</div>';
|
||||
@@ -166,7 +166,7 @@ class Pagesnotfound extends Module
|
||||
{
|
||||
$http_referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
|
||||
if (empty($http_referer) OR Validate::isAbsoluteUrl($http_referer))
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'pagenotfound` (`request_uri`, `http_referer`, `date_add`, `id_shop`, `id_group_shop`) VALUES (\''.pSQL($request_uri).'\', \''.pSQL($http_referer).'\', NOW(), '.$this->context->shop->getID().', '.$this->context->shop->getGroupID().')');
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'pagenotfound` (`request_uri`, `http_referer`, `date_add`, `id_shop`, `id_group_shop`) VALUES (\''.pSQL($request_uri).'\', \''.pSQL($http_referer).'\', NOW(), '.$this->context->shop->getID().', '.$this->context->shop->getGroupID().')');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class PayPal extends PaymentModule
|
||||
|
||||
|
||||
/* Set database */
|
||||
if (!Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
|
||||
if (!Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
|
||||
`id_order` int(10) unsigned NOT NULL,
|
||||
`id_transaction` varchar(255) NOT NULL,
|
||||
`payment_method` int(10) unsigned NOT NULL,
|
||||
@@ -651,7 +651,7 @@ class PayPal extends PaymentModule
|
||||
FROM `'._DB_PREFIX_.'orders`
|
||||
WHERE `id_cart` = '.(int)$cart->id);
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'paypal_order` (`id_order`, `id_transaction`, `payment_method`, `payment_status`, `capture`)
|
||||
VALUES ('.(int)$id_order.', \''.pSQL($extraVars['transaction_id']).'\', '.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').', \''.pSQL($extraVars['payment_status']).((isset($extraVars['pending_reason']) AND $extraVars['pending_reason'] == 'authorization') ? '_authorization' : '').'\', '.(int)(Configuration::get('PAYPAL_CAPTURE')).')');
|
||||
}
|
||||
@@ -1052,7 +1052,7 @@ class PayPal extends PaymentModule
|
||||
if (array_key_exists('ACK', $response) AND $response['ACK'] == 'Success' AND $response['REFUNDTRANSACTIONID'] != '')
|
||||
{
|
||||
$message .= $this->l('PayPal refund successful!');
|
||||
if (!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \'Refunded\' WHERE `id_order` = '.(int)($id_order)))
|
||||
if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \'Refunded\' WHERE `id_order` = '.(int)($id_order)))
|
||||
die(Tools::displayError('Error when updating PayPal database'));
|
||||
$history = new OrderHistory();
|
||||
$history->id_order = (int)($id_order);
|
||||
@@ -1097,7 +1097,7 @@ class PayPal extends PaymentModule
|
||||
}
|
||||
elseif (isset($response['PAYMENTSTATUS']))
|
||||
$message .= $this->l('Transaction error!');
|
||||
if (!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `capture` = 0, `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).'\', `id_transaction` = \''.pSQL($response['TRANSACTIONID']).'\' WHERE `id_order` = '.(int)$id_order))
|
||||
if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `capture` = 0, `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).'\', `id_transaction` = \''.pSQL($response['TRANSACTIONID']).'\' WHERE `id_order` = '.(int)$id_order))
|
||||
die(Tools::displayError('Error when updating PayPal database'));
|
||||
$this->_addNewPrivateMessage((int)($id_order), $message);
|
||||
|
||||
@@ -1147,7 +1147,7 @@ class PayPal extends PaymentModule
|
||||
$history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), (int)($id_order));
|
||||
$history->addWithemail();
|
||||
}
|
||||
if (!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).($response['PENDINGREASON'] == 'authorization' ? '_authorization' : '').'\' WHERE `id_order` = '.(int)$id_order))
|
||||
if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).($response['PENDINGREASON'] == 'authorization' ? '_authorization' : '').'\' WHERE `id_order` = '.(int)$id_order))
|
||||
die(Tools::displayError('Error when updating PayPal database'));
|
||||
}
|
||||
}
|
||||
@@ -1191,14 +1191,14 @@ class PayPal extends PaymentModule
|
||||
}
|
||||
}
|
||||
/* Create Table */
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` (
|
||||
`id_order` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_transaction` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id_order`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'))
|
||||
$ok = false;
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `payment_method` INT NOT NULL,
|
||||
ADD `payment_status` VARCHAR(255) NOT NULL,
|
||||
ADD `capture` INT NOT NULL'))
|
||||
|
||||
@@ -31,19 +31,19 @@ class PSCDisposition
|
||||
|
||||
public static function create($id_cart, $mtid, $amount, $currency)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'INSERT INTO `'._DB_PREFIX_.self::TABLE_NAME.'` (`id_cart`, `mtid`, `amount`, `currency`)
|
||||
VALUES ('.(int)($id_cart).',\''.pSQL($mtid).'\','.(float)($amount).',\''.pSQL($currency).'\')');
|
||||
}
|
||||
|
||||
public static function delete($id)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_disposition` = '.(int)($id));
|
||||
}
|
||||
|
||||
public static function deleteByCartId($id_cart)
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.self::TABLE_NAME.'` WHERE `id_cart` = '.(int)($id_cart));
|
||||
}
|
||||
|
||||
public static function getByCartId($id_cart)
|
||||
@@ -53,7 +53,7 @@ class PSCDisposition
|
||||
|
||||
public static function createTable()
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'` (
|
||||
`id_disposition` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id_cart` int(11) NOT NULL,
|
||||
@@ -67,12 +67,12 @@ class PSCDisposition
|
||||
|
||||
public static function dropTable()
|
||||
{
|
||||
return Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
return Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.self::TABLE_NAME.'`');
|
||||
}
|
||||
|
||||
public static function updateAmount($id_disposition, $amount)
|
||||
{
|
||||
return Db::getInstance()->Execute(
|
||||
return Db::getInstance()->execute(
|
||||
'UPDATE `'._DB_PREFIX_.self::TABLE_NAME.'` SET `amount` = `amount` - '.(float)($amount).' WHERE `id_disposition` = '.(int)($id_disposition));
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ abstract class PSCPrepaidServices extends PaymentModule
|
||||
private function _getAllowedCurrencies()
|
||||
{
|
||||
if (empty($this->allowed_currencies))
|
||||
$this->allowed_currencies = DB::getInstance()->ExecuteS(
|
||||
$this->allowed_currencies = DB::getInstance()->executeS(
|
||||
'SELECT c.id_currency, c.iso_code, c.name, c.sign
|
||||
FROM '._DB_PREFIX_.'currency c
|
||||
WHERE c.deleted = 0
|
||||
|
||||
@@ -98,7 +98,7 @@ class PrestaFraud extends Module
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
|
||||
foreach ($sql as $query)
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->Execute(trim($query)))
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class PrestaFraud extends Module
|
||||
|
||||
$carrier_infos->addChild('type', $carriers_type[$carrier->id]);
|
||||
if ($this->_pushDatas($root->asXml()) !== false)
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'prestafraud_orders (id_order) VALUES('.(int)$params['order']->id.')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'prestafraud_orders (id_order) VALUES('.(int)$params['order']->id.')');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -425,12 +425,12 @@ class PrestaFraud extends Module
|
||||
FROM '._DB_PREFIX_.'prestafraud_carts
|
||||
WHERE id_cart='.(int)($params['cart']->id));
|
||||
if ($res)
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'prestafraud_carts`
|
||||
SET `ip_address` = '.ip2long($_SERVER['REMOTE_ADDR']).', `date` = \''.pSQL(date('Y-m-d H:i:s')).'\'
|
||||
WHERE `id_cart` = '.(int)($params['cart']->id).' LIMIT 1');
|
||||
else
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'prestafraud_carts` (`id_cart`, `ip_address`, `date`)
|
||||
VALUES ('.(int)($params['cart']->id).', '.ip2long($_SERVER['REMOTE_ADDR']).',\''.date('Y-m-d H:i:s').'\')');
|
||||
return true;
|
||||
@@ -453,7 +453,7 @@ class PrestaFraud extends Module
|
||||
FROM '._DB_PREFIX_.'orders
|
||||
WHERE valid=0 AND id_order!='.(int)$order->id.' AND id_customer = '.(int)$order->id_customer);
|
||||
|
||||
$ip_addresses = Db::getInstance()->ExecuteS('
|
||||
$ip_addresses = Db::getInstance()->executeS('
|
||||
SELECT c.ip_address
|
||||
FROM '._DB_PREFIX_.'guest g
|
||||
LEFT JOIN '._DB_PREFIX_.'connections c ON (c.id_guest = g.id_guest)
|
||||
@@ -513,7 +513,7 @@ class PrestaFraud extends Module
|
||||
return false;
|
||||
$xml = simplexml_load_string($result);
|
||||
if ((int)$xml->check_scoring->status != -1)
|
||||
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'prestafraud_orders SET scoring = '.(float)$xml->check_scoring->scoring.', comment = \''.pSQL($xml->check_scoring->comment).'\' WHERE id_order='.(int)$id_order);
|
||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'prestafraud_orders SET scoring = '.(float)$xml->check_scoring->scoring.', comment = \''.pSQL($xml->check_scoring->comment).'\' WHERE id_order='.(int)$id_order);
|
||||
$scoring = array('scoring' => (float)$xml->check_scoring->scoring, 'comment' => (string)$xml->check_scoring->comment);
|
||||
}
|
||||
return $scoring;
|
||||
@@ -530,7 +530,7 @@ class PrestaFraud extends Module
|
||||
|
||||
private function _getConfiguredCarriers()
|
||||
{
|
||||
$res = Db::getInstance()->ExecuteS('SELECT * FROM '._DB_PREFIX_.'prestafraud_carrier');
|
||||
$res = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'prestafraud_carrier');
|
||||
$carriers = array();
|
||||
foreach ($res AS $row)
|
||||
$carriers[$row['id_carrier']] = $row['id_prestafraud_carrier_type'];
|
||||
@@ -540,7 +540,7 @@ class PrestaFraud extends Module
|
||||
|
||||
private function _getConfiguredPayments()
|
||||
{
|
||||
$res = Db::getInstance()->ExecuteS('SELECT * FROM '._DB_PREFIX_.'prestafraud_payment');
|
||||
$res = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'prestafraud_payment');
|
||||
$payments = array();
|
||||
foreach ($res AS $row)
|
||||
$payments[$row['id_module']] = $row['id_prestafraud_payment_type'];
|
||||
@@ -550,21 +550,21 @@ class PrestaFraud extends Module
|
||||
|
||||
private function _setCarriersConfiguration($carriers)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'prestafraud_carrier');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'prestafraud_carrier');
|
||||
foreach ($carriers AS $id_carrier => $id_carrier_type)
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'prestafraud_carrier (id_carrier, id_prestafraud_carrier_type) VALUES ('.(int)$id_carrier.', '.(int)$id_carrier_type.')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'prestafraud_carrier (id_carrier, id_prestafraud_carrier_type) VALUES ('.(int)$id_carrier.', '.(int)$id_carrier_type.')');
|
||||
}
|
||||
|
||||
private function _setPaymentsConfiguration($payments)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'prestafraud_payment');
|
||||
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'prestafraud_payment');
|
||||
foreach ($payments AS $id_module => $id_payment_type)
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'prestafraud_payment (id_module, id_prestafraud_payment_type) VALUES ('.(int)$id_module.', '.(int)$id_payment_type.')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'prestafraud_payment (id_module, id_prestafraud_payment_type) VALUES ('.(int)$id_module.', '.(int)$id_payment_type.')');
|
||||
}
|
||||
|
||||
private function _updateConfiguredCarrier($old, $new)
|
||||
{
|
||||
return Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'prestafraud_carrier SET id_carrier='.(int)$new.' WHERE id_carrier='.(int)$old);
|
||||
return Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'prestafraud_carrier SET id_carrier='.(int)$new.' WHERE id_carrier='.(int)$old);
|
||||
}
|
||||
|
||||
private function _pushDatas($datas)
|
||||
|
||||
@@ -108,7 +108,7 @@ class ProductComment extends ObjectModel
|
||||
if ($n != null && $n <= 0)
|
||||
$n = 5;
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT pc.`id_product_comment`,
|
||||
(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment` AND pcu.`usefulness` = 1) as total_useful,
|
||||
(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment`) as total_advice, '.
|
||||
@@ -129,7 +129,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function getByCustomer($id_product, $id_customer, $last = false, $id_guest = false)
|
||||
{
|
||||
$results = Db::getInstance()->ExecuteS('
|
||||
$results = Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||
WHERE pc.`id_product` = '.(int)$id_product.'
|
||||
@@ -159,7 +159,7 @@ class ProductComment extends ObjectModel
|
||||
$validate = Configuration::get('PRODUCT_COMMENTS_MODERATE');
|
||||
|
||||
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT pc.`id_product_comment`, pcg.`grade`, pccl.`name`, pcc.`id_product_comment_criterion`
|
||||
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_comment_grade` pcg ON (pcg.`id_product_comment` = pc.`id_product_comment`)
|
||||
@@ -250,7 +250,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function getByValidate($validate = '0', $deleted = false)
|
||||
{
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT pc.`id_product_comment`, pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
|
||||
@@ -266,7 +266,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function getAll()
|
||||
{
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT pc.`id_product_comment`, pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment` pc
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
|
||||
@@ -283,7 +283,7 @@ class ProductComment extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($this->id))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'product_comment` SET
|
||||
`validate` = '.(int)$validate.'
|
||||
WHERE `id_product_comment` = '.(int)$this->id));
|
||||
@@ -298,7 +298,7 @@ class ProductComment extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_product_comment))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_grade`
|
||||
WHERE `id_product_comment` = '.(int)$id_product_comment));
|
||||
}
|
||||
@@ -312,7 +312,7 @@ class ProductComment extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_product_comment))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_report`
|
||||
WHERE `id_product_comment` = '.(int)$id_product_comment));
|
||||
}
|
||||
@@ -327,7 +327,7 @@ class ProductComment extends ObjectModel
|
||||
if (!Validate::isUnsignedId($id_product_comment))
|
||||
die(Tools::displayError());
|
||||
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_usefulness`
|
||||
WHERE `id_product_comment` = '.(int)$id_product_comment));
|
||||
}
|
||||
@@ -339,7 +339,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function reportComment($id_product_comment, $id_customer)
|
||||
{
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_report` (`id_product_comment`, `id_customer`)
|
||||
VALUES ('.(int)$id_product_comment.', '.(int)$id_customer.')'));
|
||||
}
|
||||
@@ -365,7 +365,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function setCommentUsefulness($id_product_comment, $usefulness, $id_customer)
|
||||
{
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_usefulness` (`id_product_comment`, `usefulness`, `id_customer`)
|
||||
VALUES ('.(int)$id_product_comment.', '.(int)$usefulness.', '.(int)$id_customer.')'));
|
||||
}
|
||||
@@ -391,7 +391,7 @@ class ProductComment extends ObjectModel
|
||||
*/
|
||||
public static function getReportedComments()
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT(pc.`id_product_comment`), pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment_report` pcr
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_comment` pc
|
||||
|
||||
@@ -57,15 +57,15 @@ class ProductCommentCriterion extends ObjectModel
|
||||
if (!parent::delete())
|
||||
return false;
|
||||
if ($this->id_product_comment_criterion_type == 2)
|
||||
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category
|
||||
if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category
|
||||
WHERE id_product_comment_criterion='.(int)$this->id))
|
||||
return false;
|
||||
elseif ($this->id_product_comment_criterion_type == 3)
|
||||
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product
|
||||
if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product
|
||||
WHERE id_product_comment_criterion='.(int)$this->id))
|
||||
return false;
|
||||
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'product_comment_grade`
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_comment_grade`
|
||||
WHERE `id_product_comment_criterion` = '.(int)$this->id);
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@ class ProductCommentCriterion extends ObjectModel
|
||||
if ($previousUpdate->id_product_comment_criterion_type != $this->id_product_comment_criterion_type)
|
||||
{
|
||||
if ($previousUpdate->id_product_comment_criterion_type == 2)
|
||||
return Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category
|
||||
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category
|
||||
WHERE id_product_comment_criterion='.(int)$previousUpdate->id);
|
||||
elseif ($previousUpdate->id_product_comment_criterion_type == 3)
|
||||
return Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product
|
||||
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product
|
||||
WHERE id_product_comment_criterion='.(int)$previousUpdate->id);
|
||||
}
|
||||
return true;
|
||||
@@ -95,7 +95,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_product))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_product` (`id_product_comment_criterion`, `id_product`)
|
||||
return (Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_product` (`id_product_comment_criterion`, `id_product`)
|
||||
VALUES('.(int)$this->id.','.(int)$id_product.')'));
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_category))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_category` (`id_product_comment_criterion`, `id_category`)
|
||||
return (Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_category` (`id_product_comment_criterion`, `id_category`)
|
||||
VALUES('.(int)$this->id.','.(int)$id_category.')'));
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
$grade = 0;
|
||||
else if ($grade > 10)
|
||||
$grade = 10;
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_grade`
|
||||
(`id_product_comment`, `id_product_comment_criterion`, `grade`) VALUES(
|
||||
'.(int)($id_product_comment).',
|
||||
@@ -143,7 +143,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
if (!Validate::isUnsignedId($id_product) ||
|
||||
!Validate::isUnsignedId($id_lang))
|
||||
die(Tools::displayError());
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT pcc.`id_product_comment_criterion`, pccl.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion` pcc
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_lang` pccl ON (pcc.id_product_comment_criterion = pccl.id_product_comment_criterion)
|
||||
@@ -163,7 +163,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_lang))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT pcc.`id_product_comment_criterion`, pcc.id_product_comment_criterion_type, pccl.`name`, pcc.active
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion` pcc
|
||||
JOIN `'._DB_PREFIX_.'product_comment_criterion_lang` pccl ON (pcc.id_product_comment_criterion = pccl.id_product_comment_criterion)
|
||||
@@ -173,7 +173,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
|
||||
public function getProducts()
|
||||
{
|
||||
$res = Db::getInstance()->ExecuteS('
|
||||
$res = Db::getInstance()->executeS('
|
||||
SELECT pccp.id_product, pccp.id_product_comment_criterion
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion_product` pccp
|
||||
WHERE pccp.id_product_comment_criterion = '.(int)$this->id);
|
||||
@@ -186,7 +186,7 @@ class ProductCommentCriterion extends ObjectModel
|
||||
|
||||
public function getCategories()
|
||||
{
|
||||
$res = Db::getInstance()->ExecuteS('
|
||||
$res = Db::getInstance()->executeS('
|
||||
SELECT pccc.id_category, pccc.id_product_comment_criterion
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion_category` pccc
|
||||
WHERE pccc.id_product_comment_criterion = '.(int)$this->id);
|
||||
@@ -199,12 +199,12 @@ class ProductCommentCriterion extends ObjectModel
|
||||
|
||||
public function deleteCategories()
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_category` WHERE `id_product_comment_criterion` = '.(int)$this->id);
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_category` WHERE `id_product_comment_criterion` = '.(int)$this->id);
|
||||
}
|
||||
|
||||
public function deleteProducts()
|
||||
{
|
||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product` WHERE `id_product_comment_criterion` = '.(int)$this->id);
|
||||
return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product` WHERE `id_product_comment_criterion` = '.(int)$this->id);
|
||||
}
|
||||
|
||||
public static function getTypes()
|
||||
|
||||
@@ -37,7 +37,7 @@ class ProductCommentCriterion
|
||||
if (!Validate::isUnsignedId($id_lang) ||
|
||||
!Validate::isMessage($name))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_criterion`
|
||||
(`id_lang`, `name`) VALUES(
|
||||
'.(int)($id_lang).',
|
||||
@@ -54,7 +54,7 @@ class ProductCommentCriterion
|
||||
if (!Validate::isUnsignedId($id_product_comment_criterion) ||
|
||||
!Validate::isUnsignedId($id_product))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_product`
|
||||
(`id_product_comment_criterion`, `id_product`) VALUES(
|
||||
'.(int)($id_product_comment_criterion).',
|
||||
@@ -75,7 +75,7 @@ class ProductCommentCriterion
|
||||
$grade = 0;
|
||||
else if ($grade > 10)
|
||||
$grade = 10;
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'product_comment_grade`
|
||||
(`id_product_comment`, `id_product_comment_criterion`, `grade`) VALUES(
|
||||
'.(int)($id_product_comment).',
|
||||
@@ -94,7 +94,7 @@ class ProductCommentCriterion
|
||||
!Validate::isUnsignedId($id_lang) ||
|
||||
!Validate::isMessage($name))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'product_comment_criterion` SET
|
||||
`name` = \''.pSQL($name).'\'
|
||||
WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion).' AND
|
||||
@@ -111,7 +111,7 @@ class ProductCommentCriterion
|
||||
if (!Validate::isUnsignedId($id_product) ||
|
||||
!Validate::isUnsignedId($id_lang))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT pcc.`id_product_comment_criterion`, pcc.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion` pcc
|
||||
INNER JOIN `'._DB_PREFIX_.'product_comment_criterion_product` pccp ON pcc.`id_product_comment_criterion` = pccp.`id_product_comment_criterion`
|
||||
@@ -128,7 +128,7 @@ class ProductCommentCriterion
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_lang))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->ExecuteS('
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT pcc.`id_product_comment_criterion`, pcc.`name`
|
||||
FROM `'._DB_PREFIX_.'product_comment_criterion` pcc
|
||||
WHERE pcc.`id_lang` = '.(int)($id_lang).'
|
||||
@@ -144,7 +144,7 @@ class ProductCommentCriterion
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_product))
|
||||
die(Tools::displayError());
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product`
|
||||
WHERE `id_product` = '.(int)($id_product)));
|
||||
}
|
||||
@@ -158,17 +158,17 @@ class ProductCommentCriterion
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_product_comment_criterion))
|
||||
die(Tools::displayError());
|
||||
$result = Db::getInstance()->Execute('
|
||||
$result = Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_grade`
|
||||
WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion));
|
||||
if ($result === false)
|
||||
return ($result);
|
||||
$result = Db::getInstance()->Execute('
|
||||
$result = Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product`
|
||||
WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion));
|
||||
if ($result === false)
|
||||
return ($result);
|
||||
return (Db::getInstance()->Execute('
|
||||
return (Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'product_comment_criterion`
|
||||
WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion)));
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class ProductComments extends Module
|
||||
$sql = preg_split("/;\s*[\r\n]+/", trim($sql));
|
||||
|
||||
foreach ($sql as $query)
|
||||
if (!Db::getInstance()->Execute(trim($query)))
|
||||
if (!Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
if (parent::install() == false ||
|
||||
!$this->registerHook('productTab') ||
|
||||
@@ -95,7 +95,7 @@ class ProductComments extends Module
|
||||
|
||||
public function deleteTables()
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
DROP TABLE IF EXISTS
|
||||
`'._DB_PREFIX_.'product_comment`,
|
||||
`'._DB_PREFIX_.'product_comment_criterion`,
|
||||
|
||||
@@ -143,7 +143,7 @@ class ReferralProgramModule extends ObjectModel
|
||||
$query.= ' AND s.`id_customer` != 0';
|
||||
}
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,7 +84,7 @@ class ReferralProgram extends Module
|
||||
|
||||
public function installDB()
|
||||
{
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'referralprogram` (
|
||||
`id_referralprogram` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_sponsor` INT UNSIGNED NOT NULL,
|
||||
@@ -116,7 +116,7 @@ class ReferralProgram extends Module
|
||||
|
||||
public function uninstallDB()
|
||||
{
|
||||
return Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'referralprogram`;');
|
||||
return Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'referralprogram`;');
|
||||
}
|
||||
|
||||
public function removeMail()
|
||||
|
||||
@@ -57,7 +57,7 @@ class Reverso extends Module
|
||||
WHERE `name` = \'createAccountTop\'
|
||||
');
|
||||
if (!$result)
|
||||
if(!Db::getInstance()->Execute('
|
||||
if(!Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`)
|
||||
VALUES (\'createAccountTop\', \'Block above the form for create an account\', NULL , \'1\');
|
||||
'))
|
||||
|
||||
@@ -96,7 +96,7 @@ class Secuvad_connection
|
||||
$this->secuvad_h->secuvad_log('secuvad_connection.php::report_fraud() '."\n\t".' Fraud: '.(int)($idtransaction).'/'.$feedback);
|
||||
elseif ($balise == 'impaye_report')
|
||||
$this->secuvad_h->secuvad_log('secuvad_connection.php::report_fraud() '."\n\t".' Unpaid: '.(int)($idtransaction).'/'.$feedback);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `is_fraud` = 1
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
@@ -131,7 +131,7 @@ class Secuvad_connection
|
||||
if (!empty($erreur))
|
||||
{
|
||||
$this->secuvad_h->secuvad_log('secuvad_connection.php::send_transaction() '."\n\t".' Error: '.$erreur);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `secuvad_status` = 4, `error` = \''.pSQL($erreur).'\'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
@@ -140,7 +140,7 @@ class Secuvad_connection
|
||||
{
|
||||
$this->secuvad_h->secuvad_log('secuvad_connection.php::send_transaction() '."\n\t".' Response: '.(int)($idtransaction).'/'.(int)($score).'/'.$advice);
|
||||
if(preg_match('/[0-9]+/', $score))
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `secuvad_status` = 5, `score` = '.(int)($score).', error = \'\'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
@@ -158,7 +158,7 @@ class Secuvad_connection
|
||||
$secuvad_status = 2;
|
||||
else
|
||||
$secuvad_status = 4;
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `advice` = \''.pSQL($advice).'\', `error` = \'\', `secuvad_status` = '.(int)($secuvad_status).'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
|
||||
+42
-42
@@ -85,7 +85,7 @@ class Secuvad extends Module
|
||||
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
foreach ($sql as $query)
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->Execute(trim($query)))
|
||||
if ($query AND sizeof($query) AND !Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
|
||||
$langs = Language::getLanguages();
|
||||
@@ -130,7 +130,7 @@ class Secuvad extends Module
|
||||
(14,\'Services\',14,'.(int)($lang['id_lang']).'),';
|
||||
}
|
||||
$query = rtrim($query, ',');
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
|
||||
$query = '
|
||||
INSERT IGNORE INTO '._DB_PREFIX_.'secuvad_payment(`code`, `name`, `id_lang`)
|
||||
@@ -157,7 +157,7 @@ class Secuvad extends Module
|
||||
(\'contre-remboursement\',\'On delivery\','.(int)($lang['id_lang']).'),';
|
||||
}
|
||||
$query = rtrim($query, ',');
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
|
||||
$query = '
|
||||
INSERT IGNORE INTO '._DB_PREFIX_.'secuvad_transport(`transport_id`, `transport_name`, `id_lang`)
|
||||
@@ -184,7 +184,7 @@ class Secuvad extends Module
|
||||
(6,\'Immaterial Good/Service\','.(int)($lang['id_lang']).'),';
|
||||
}
|
||||
$query = rtrim($query, ',');
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
|
||||
$query = '
|
||||
INSERT IGNORE INTO `'._DB_PREFIX_.'secuvad_transport_delay`(`transport_delay_id`, `transport_delay_name`, `id_lang`)
|
||||
@@ -194,12 +194,12 @@ class Secuvad extends Module
|
||||
(1,\'express\','.(int)($lang['id_lang']).'),
|
||||
(2,\'standard\','.(int)($lang['id_lang']).'),';
|
||||
$query = rtrim($query, ',');
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
|
||||
if (!file_exists(dirname(__FILE__).'/../../classes/PaymentCC.php'))
|
||||
{
|
||||
@copy(dirname(__FILE__).'/classes/PaymentCC.php', dirname(__FILE__).'/../../classes/PaymentCC.php');
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'hook`(`name`, `title`, `position`)
|
||||
VALUES (\'paymentCCAdded\', \'paymentCCAdded\', 0)');
|
||||
$this->registerHook('paymentCCAdded');
|
||||
@@ -231,15 +231,15 @@ class Secuvad extends Module
|
||||
|| !Configuration::deleteByName('SECUVAD_XML_ENCODING'))
|
||||
return false;
|
||||
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_category`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_payment`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_transport`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_category`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_logs`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_order`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_payment`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_transport`');
|
||||
Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_transport_delay`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_category`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_payment`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_assoc_transport`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_category`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_logs`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_order`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_payment`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_transport`');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'secuvad_transport_delay`');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ class Secuvad extends Module
|
||||
WHERE `id_secuvad_order` = '.(int)($id_order));
|
||||
if (!$exists)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_order`(`id_secuvad_order`, `ip`, `ip_time`)
|
||||
VALUES ('.(int)($id_order).', \''.pSQL($this->getRemoteIPaddress()).'\', \''.pSQL(date("Y-m-d H:i:s")).'\')
|
||||
');
|
||||
@@ -328,7 +328,7 @@ class Secuvad extends Module
|
||||
WHERE `id_secuvad_order` = '.(int)($id_order));
|
||||
if (!$exists)
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_order`(`id_secuvad_order`, `ip`, `ip_time`)
|
||||
VALUES ('.(int)($id_order).', \''.pSQL($this->getRemoteIPaddress()).'\', \''.pSQL(date("Y-m-d H:i:s")).'\')
|
||||
');
|
||||
@@ -391,7 +391,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCategories()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_category` sc
|
||||
WHERE sc.`id_lang` = '.(int)$this->context->language->id);
|
||||
@@ -399,7 +399,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCategoryAssoc()
|
||||
{
|
||||
$data = Db::getInstance()->ExecuteS('
|
||||
$data = Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_assoc_category`');
|
||||
|
||||
@@ -414,7 +414,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadPayment()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT IF(sp.name IS NULL, "Unknown", sp.name) AS `secuvad_name`, sp.`code`, m.`id_module`, m.`name` AS `module_name`
|
||||
FROM `'._DB_PREFIX_.'secuvad_assoc_payment` sac
|
||||
JOIN `'._DB_PREFIX_.'module` m ON (m.`id_module` = sac.`id_module`)
|
||||
@@ -423,7 +423,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCodePayment()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_payment`
|
||||
WHERE `id_lang` = '.(int)$this->context->language->id
|
||||
@@ -432,7 +432,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCarrier()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_assoc_transport` sat
|
||||
JOIN '._DB_PREFIX_.'carrier c ON (c.id_carrier = sat.id_carrier)
|
||||
@@ -443,7 +443,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCarrierType()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_transport`
|
||||
WHERE `id_lang` = '.(int)$this->context->language->id
|
||||
@@ -452,7 +452,7 @@ class Secuvad extends Module
|
||||
|
||||
private function _getSecuvadCarrierDelay()
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'secuvad_transport_delay`
|
||||
WHERE `id_lang` = '.(int)$this->context->language->id
|
||||
@@ -543,7 +543,7 @@ class Secuvad extends Module
|
||||
|
||||
if (Tools::isSubmit('submitSecuvadCategory'))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_category`
|
||||
');
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_category` VALUES';
|
||||
@@ -554,7 +554,7 @@ class Secuvad extends Module
|
||||
$sql .= '(NULL, '.(int)($id_category).', '.(int)($category_id).'),';
|
||||
}
|
||||
$sql = rtrim($sql, ',');
|
||||
if (Db::getInstance()->Execute($sql))
|
||||
if (Db::getInstance()->execute($sql))
|
||||
$this->_html .= $this->displayConfirmation($this->l('Settings are updated'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Error during update'));
|
||||
@@ -562,7 +562,7 @@ class Secuvad extends Module
|
||||
|
||||
if (Tools::isSubmit('submitSecuvadPayment'))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_payment`
|
||||
');
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_payment` VALUES';
|
||||
@@ -573,7 +573,7 @@ class Secuvad extends Module
|
||||
$sql .= '(NULL, '.(int)($id_module).', \''.pSQL($code).'\'),';
|
||||
}
|
||||
$sql = rtrim($sql, ',');
|
||||
if (Db::getInstance()->Execute($sql))
|
||||
if (Db::getInstance()->execute($sql))
|
||||
$this->_html .= $this->displayConfirmation($this->l('Settings are updated'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Error during update'));
|
||||
@@ -581,7 +581,7 @@ class Secuvad extends Module
|
||||
|
||||
if (Tools::isSubmit('submitSecuvadCarrier'))
|
||||
{
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_transport`
|
||||
');
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_transport` VALUES';
|
||||
@@ -592,7 +592,7 @@ class Secuvad extends Module
|
||||
$sql .= '(NULL, '.(int)($id_carrier).', '.(int)($value).', '.(int)($_POST['secuvad_carrier_delay_'.(int)($id_carrier)]).'),';
|
||||
}
|
||||
$sql = rtrim($sql, ',');
|
||||
if (Db::getInstance()->Execute($sql))
|
||||
if (Db::getInstance()->execute($sql))
|
||||
$this->_html .= $this->displayConfirmation($this->l('Settings are updated'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Error during update'));
|
||||
@@ -959,7 +959,7 @@ class Secuvad extends Module
|
||||
$report .= $this->l('Mail:').$mail."\n\n";
|
||||
$report .= $this->l('Issue description:')."\n".$probleme."\n\n";
|
||||
$report .= $this->l('Log files:')."\n";
|
||||
$res = Db::getInstance()->ExecuteS('
|
||||
$res = Db::getInstance()->executeS('
|
||||
SELECT `message`, `date`
|
||||
FROM `'._DB_PREFIX_.'secuvad_logs`
|
||||
ORDER BY `date` DESC
|
||||
@@ -996,7 +996,7 @@ class Secuvad extends Module
|
||||
private function check_payment()
|
||||
{
|
||||
$result = true;
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_payment`
|
||||
WHERE `id_module` NOT IN
|
||||
(
|
||||
@@ -1008,7 +1008,7 @@ class Secuvad extends Module
|
||||
)
|
||||
');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_payment` (`id_module`)
|
||||
(
|
||||
SELECT m.`id_module` FROM `'._DB_PREFIX_.'hook` h
|
||||
@@ -1019,7 +1019,7 @@ class Secuvad extends Module
|
||||
AND sap.`id_module` IS NULL
|
||||
)');
|
||||
|
||||
$module_not_assoc = Db::getInstance()->ExecuteS('
|
||||
$module_not_assoc = Db::getInstance()->executeS('
|
||||
SELECT m.`name`, m.`id_module`
|
||||
FROM `'._DB_PREFIX_.'hook` h
|
||||
JOIN `'._DB_PREFIX_.'hook_module` hm ON (hm.`id_hook` = h.`id_hook`)
|
||||
@@ -1042,7 +1042,7 @@ class Secuvad extends Module
|
||||
private function check_transport()
|
||||
{
|
||||
$result = true;
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_transport`
|
||||
WHERE `id_carrier` NOT IN
|
||||
(
|
||||
@@ -1051,7 +1051,7 @@ class Secuvad extends Module
|
||||
)
|
||||
');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_transport`(id_carrier)
|
||||
(
|
||||
SELECT c.`id_carrier`
|
||||
@@ -1062,7 +1062,7 @@ class Secuvad extends Module
|
||||
)
|
||||
');
|
||||
|
||||
$module_not_assoc = Db::getInstance()->ExecuteS('
|
||||
$module_not_assoc = Db::getInstance()->executeS('
|
||||
SELECT c.`name`, c.`id_carrier`
|
||||
FROM `'._DB_PREFIX_.'carrier` c
|
||||
JOIN `'._DB_PREFIX_.'secuvad_assoc_transport` sat ON (sat.`id_carrier` = c.`id_carrier`)
|
||||
@@ -1087,7 +1087,7 @@ class Secuvad extends Module
|
||||
private function check_category()
|
||||
{
|
||||
$result = true;
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_assoc_category`
|
||||
WHERE `id_category` NOT IN
|
||||
(
|
||||
@@ -1096,7 +1096,7 @@ class Secuvad extends Module
|
||||
)
|
||||
');
|
||||
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_assoc_category`(id_category)
|
||||
(
|
||||
SELECT c.`id_category`
|
||||
@@ -1106,7 +1106,7 @@ class Secuvad extends Module
|
||||
)
|
||||
');
|
||||
|
||||
$module_not_assoc = Db::getInstance()->ExecuteS('
|
||||
$module_not_assoc = Db::getInstance()->executeS('
|
||||
SELECT cl.`name`, c.`id_category`
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
JOIN `'._DB_PREFIX_.'category_lang` cl ON (cl.`id_category` = c.`id_category`'.$this->context->shop->sqlLang('cl').')
|
||||
@@ -1204,11 +1204,11 @@ class Secuvad extends Module
|
||||
SELECT COUNT(0) nb
|
||||
FROM `'._DB_PREFIX_.'secuvad_logs`');
|
||||
if($res > $this->get_secuvad_max_log_size())
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'secuvad_logs`
|
||||
ORDER BY `date`
|
||||
LIMIT '.(int)($this->get_secuvad_log_size()));
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
INSERT INTO `'._DB_PREFIX_.'secuvad_logs` (`message`)
|
||||
VALUES (\''.pSQL($message).'\')
|
||||
');
|
||||
|
||||
@@ -53,7 +53,7 @@ if (in_array($secuvad->getRemoteIPaddress(), $secuvad->get_secuvad_ip()))
|
||||
if (!empty($erreur))
|
||||
{
|
||||
$secuvad->secuvad_log('secuvad_response.php '."\n\t".' Error: '.$erreur);
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `secuvad_status` = 4, `error` = '.pSQL($erreur).'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
@@ -63,7 +63,7 @@ if (in_array($secuvad->getRemoteIPaddress(), $secuvad->get_secuvad_ip()))
|
||||
$secuvad->secuvad_log('secuvad_response.php '."\n\t".' Response: '.$rep);
|
||||
|
||||
if (preg_match('/[0-9]+/Ui', $score))
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `secuvad_status` = 5, `score` = '.(int)($score).'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
@@ -81,7 +81,7 @@ if (in_array($secuvad->getRemoteIPaddress(), $secuvad->get_secuvad_ip()))
|
||||
$secuvad_status = 2;
|
||||
else
|
||||
$secuvad_status = 4;
|
||||
Db::getInstance()->Execute('
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'secuvad_order`
|
||||
SET `secuvad_status` = '.(int)($secuvad_status).', `advice` = \''.pSQL($advice).'\'
|
||||
WHERE `id_secuvad_order` = '.(int)($idtransaction));
|
||||
|
||||
@@ -64,7 +64,7 @@ class SEKeywords extends ModuleGraph
|
||||
return false;
|
||||
Configuration::updateValue('SEK_MIN_OCCURENCES', 1);
|
||||
Configuration::updateValue('SEK_FILTER_KW', '');
|
||||
return Db::getInstance()->Execute('
|
||||
return Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'sekeyword` (
|
||||
id_sekeyword INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
id_shop INTEGER UNSIGNED NOT NULL DEFAULT \'1\',
|
||||
@@ -79,7 +79,7 @@ class SEKeywords extends ModuleGraph
|
||||
{
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
return (Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'sekeyword`'));
|
||||
return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'sekeyword`'));
|
||||
}
|
||||
|
||||
public function hookTop($params)
|
||||
@@ -88,7 +88,7 @@ class SEKeywords extends ModuleGraph
|
||||
return;
|
||||
|
||||
if ($keywords = $this->getKeywords($_SERVER['HTTP_REFERER']))
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'sekeyword` (`keyword`, `date_add`, `id_shop`, `id_group_shop`)
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'sekeyword` (`keyword`, `date_add`, `id_shop`, `id_group_shop`)
|
||||
VALUES (\''.pSQL(Tools::strtolower(trim($keywords))).'\', NOW(), '.$this->context->shop->getID().', '.$this->context->shop->getGroupID().')');
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class SEKeywords extends ModuleGraph
|
||||
|
||||
if (Tools::getValue('export'))
|
||||
$this->csvExport(array('type' => 'pie'));
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.ModuleGraph::getDateBetween().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.ModuleGraph::getDateBetween().$this->_query2);
|
||||
$total = count($result);
|
||||
$this->_html = '<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>
|
||||
'.$total.' '.($total == 1 ? $this->l('keyword matches your query.') : $this->l('keywords match your query.')).'<div class="clear"> </div>';
|
||||
@@ -157,7 +157,7 @@ class SEKeywords extends ModuleGraph
|
||||
if (!isset($parsedUrl['query']))
|
||||
return false;
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT `server`, `getvar` FROM `'._DB_PREFIX_.'search_engine`');
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `server`, `getvar` FROM `'._DB_PREFIX_.'search_engine`');
|
||||
foreach ($result as $index => $row)
|
||||
{
|
||||
$host =& $row['server'];
|
||||
@@ -179,12 +179,12 @@ class SEKeywords extends ModuleGraph
|
||||
protected function getData($layers)
|
||||
{
|
||||
$this->_titles['main'] = $this->l('10 first keywords');
|
||||
$totalResult = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$totalResult = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
$total = 0;
|
||||
$total2 = 0;
|
||||
foreach ($totalResult as $totalRow)
|
||||
$total += $totalRow['occurences'];
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2.' LIMIT 9');
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2.' LIMIT 9');
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_legend[] = $row['keyword'];
|
||||
|
||||
@@ -32,10 +32,10 @@ if (Tools::isSubmit('checkAndSaveConfig'))
|
||||
$shopImporter = new shopImporter();
|
||||
foreach($shopImporter->supportedImports as $key => $import)
|
||||
if (array_key_exists('alterTable', $import))
|
||||
$columns = Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.bqSQL($import['table']).'`');
|
||||
$columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `'._DB_PREFIX_.bqSQL($import['table']).'`');
|
||||
foreach ($columns as $column)
|
||||
if ($column['Field'] == $import['identifier'].'_'.$moduleName)
|
||||
Db::getInstance()->Execute('ALTER IGNORE TABLE `'._DB_PREFIX_.bqSQL($import['table']).'` DROP `'.bqSQL($import['identifier'].'_'.$moduleName).'`');
|
||||
Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.bqSQL($import['table']).'` DROP `'.bqSQL($import['identifier'].'_'.$moduleName).'`');
|
||||
if ($link = @mysql_connect(Tools::getValue('server'), Tools::getValue('user'), Tools::getValue('password')))
|
||||
{
|
||||
if (!@mysql_select_db(Tools::getValue('database'), $link))
|
||||
|
||||
@@ -701,7 +701,7 @@ class shopimporter extends ImportModule
|
||||
{
|
||||
$this->saveMatchId(strtolower($className), (int)$object->id, (int)$id);
|
||||
if ($className == 'Customer')
|
||||
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer SET `passwd_'.bqSQL(Tools::getValue('moduleName')).'` = \''.pSQL($password).'\' WHERE id_customer = '.(int)$object->id);
|
||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `passwd_'.bqSQL(Tools::getValue('moduleName')).'` = \''.pSQL($password).'\' WHERE id_customer = '.(int)$object->id);
|
||||
if (array_key_exists('hasImage', $this->supportedImports[strtolower($className)]) AND Tools::isSubmit('images_'.$className))
|
||||
$this->copyImg($item, $className);
|
||||
}
|
||||
@@ -795,7 +795,7 @@ class shopimporter extends ImportModule
|
||||
$associatFields .= (int)$match[$association['fields'][1]][$v].'), ';
|
||||
}
|
||||
if ($associatFields != '')
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.bqSQL($tableAssociation).'` (`'.$associatFieldsName.'`) VALUES '.rtrim($associatFields, ', '));
|
||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.bqSQL($tableAssociation).'` (`'.$associatFieldsName.'`) VALUES '.rtrim($associatFields, ', '));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,7 +805,7 @@ class shopimporter extends ImportModule
|
||||
$table = $this->supportedImports[$className]['table'];
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
$identifier = $this->supportedImports[$className]['identifier'];
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.bqSQL($table).'` SET `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` = '.(int)$matchId.' WHERE `'.bqSQL($identifier).'` = '.(int)$psId);
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.bqSQL($table).'` SET `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` = '.(int)$matchId.' WHERE `'.bqSQL($identifier).'` = '.(int)$psId);
|
||||
}
|
||||
|
||||
private function getMatchId($className)
|
||||
@@ -813,7 +813,7 @@ class shopimporter extends ImportModule
|
||||
$table = $this->supportedImports[$className]['table'];
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
$identifier = $this->supportedImports[$className]['identifier'];
|
||||
$returns = Db::getInstance()->ExecuteS('SELECT `'.bqSQL($identifier).'_'.bqSQL($moduleName).'`, `'.bqSQL($identifier).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` != 0 ');
|
||||
$returns = Db::getInstance()->executeS('SELECT `'.bqSQL($identifier).'_'.bqSQL($moduleName).'`, `'.bqSQL($identifier).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` != 0 ');
|
||||
$match = array();
|
||||
foreach($returns as $return)
|
||||
$match[$return[$identifier.'_'.$moduleName]] = $return[$identifier];
|
||||
@@ -930,7 +930,7 @@ class shopimporter extends ImportModule
|
||||
foreach ($this->supportedImports[$className]['alterTable'] AS $name => $type)
|
||||
{
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
Db::getInstance()->ExecuteS("SHOW COLUMNS FROM `"._DB_PREFIX_.bqSQL($from)."` LIKE '".pSQL($name).'_'.pSQL($moduleName)."'");
|
||||
Db::getInstance()->executeS("SHOW COLUMNS FROM `"._DB_PREFIX_.bqSQL($from)."` LIKE '".pSQL($name).'_'.pSQL($moduleName)."'");
|
||||
if (!Db::getInstance()->numRows() AND !array_key_exists($name.'_'.$moduleName, $result))
|
||||
$queryTmp .= ' ADD `'.$name.'_'.$moduleName.'` '.$type.' NOT NULL,';
|
||||
}
|
||||
@@ -938,14 +938,14 @@ class shopimporter extends ImportModule
|
||||
{
|
||||
$query = 'ALTER TABLE `'._DB_PREFIX_.bqSQL($from).'` ';
|
||||
$query .= rtrim($queryTmp, ',');
|
||||
Db::getInstance()->Execute($query);
|
||||
Db::getInstance()->execute($query);
|
||||
}
|
||||
}
|
||||
|
||||
private function updateCat()
|
||||
{
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
Db::getInstance()->Execute('UPDATE
|
||||
Db::getInstance()->execute('UPDATE
|
||||
'._DB_PREFIX_.'category c
|
||||
INNER JOIN
|
||||
'._DB_PREFIX_.'category c2
|
||||
@@ -981,7 +981,7 @@ class shopimporter extends ImportModule
|
||||
foreach($this->supportedImports AS $table => $conf)
|
||||
if ($conf['identifier'] == $key2)
|
||||
$from = $this->supportedImports[$table]['table'];
|
||||
$return = Db::getInstance()->ExecuteS('SELECT `'.bqSQL($key2).'_'.bqSQL($moduleName).'`, `'.bqSQL($key2).'` FROM `'._DB_PREFIX_.bqSQL($from).'` WHERE `'.bqSQL($key2).'_'.bqSQL($moduleName).'` != 0');
|
||||
$return = Db::getInstance()->executeS('SELECT `'.bqSQL($key2).'_'.bqSQL($moduleName).'`, `'.bqSQL($key2).'` FROM `'._DB_PREFIX_.bqSQL($from).'` WHERE `'.bqSQL($key2).'_'.bqSQL($moduleName).'` != 0');
|
||||
if (!empty($return))
|
||||
foreach($return AS $name => $val)
|
||||
$match[$key][$val[$key2.'_'.$moduleName]] = $val[$key2];
|
||||
@@ -993,7 +993,7 @@ class shopimporter extends ImportModule
|
||||
{
|
||||
$id = $this->supportedImports[$table]['identifier'];
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
$return = Db::getInstance()->ExecuteS('SELECT `'.bqSQL($id).'_'.bqSQL($moduleName).'`, `'.bqSQL($id).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($id).'_'.bqSQL($moduleName).'` != 0');
|
||||
$return = Db::getInstance()->executeS('SELECT `'.bqSQL($id).'_'.bqSQL($moduleName).'`, `'.bqSQL($id).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($id).'_'.bqSQL($moduleName).'` != 0');
|
||||
$match = array();
|
||||
foreach($return AS $name => $val)
|
||||
$match[$val[$id.'_'.$moduleName]] = $val[$id];
|
||||
@@ -1003,7 +1003,7 @@ class shopimporter extends ImportModule
|
||||
private function getMatchIdLang($order = 1)
|
||||
{
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
$return = Db::getInstance()->ExecuteS('SELECT `id_lang`, `id_lang_'.bqSQL($moduleName).'` FROM `'._DB_PREFIX_.'lang'.'` WHERE `id_lang_'.bqSQL($moduleName).'` != 0');
|
||||
$return = Db::getInstance()->executeS('SELECT `id_lang`, `id_lang_'.bqSQL($moduleName).'` FROM `'._DB_PREFIX_.'lang'.'` WHERE `id_lang_'.bqSQL($moduleName).'` != 0');
|
||||
$match = array();
|
||||
foreach($return AS $name => $val)
|
||||
if ((bool)$order)
|
||||
@@ -1182,7 +1182,7 @@ class shopimporter extends ImportModule
|
||||
else
|
||||
{
|
||||
$newId = Language::getIdByIso($iso);
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'lang`
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'lang`
|
||||
SET `id_lang_'.bqSQL($moduleName).'` = '.(int)$language['id_lang'].'
|
||||
WHERE `id_lang` = '.(int)$newId);
|
||||
}
|
||||
@@ -1205,7 +1205,7 @@ class shopimporter extends ImportModule
|
||||
else
|
||||
{
|
||||
$newId = Language::getIdByIso($iso);
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'lang`
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'lang`
|
||||
SET `id_lang_'.bqSQL($moduleName).'` = '.(int)$language['id_lang'].'
|
||||
WHERE `id_lang` = '.(int)$newId);
|
||||
}
|
||||
@@ -1217,80 +1217,80 @@ class shopimporter extends ImportModule
|
||||
switch ($table)
|
||||
{
|
||||
case 'customer' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
|
||||
break;
|
||||
case 'address' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'address');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address');
|
||||
break;
|
||||
case 'country' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'state');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'country_lang');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'state');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country');
|
||||
case 'group' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'ps_group_lang');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'ps_group_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group');
|
||||
break;
|
||||
case 'combination' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination');
|
||||
break;
|
||||
case 'category' :
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category != 1');
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category != 1');
|
||||
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'category` AUTO_INCREMENT = 2 ');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category != 1');
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category != 1');
|
||||
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'category` AUTO_INCREMENT = 2 ');
|
||||
foreach (scandir(_PS_CAT_IMG_DIR_) AS $d)
|
||||
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
|
||||
unlink(_PS_CAT_IMG_DIR_.$d);
|
||||
Image::clearTmpDir();
|
||||
break;
|
||||
case 'product' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'image');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority');
|
||||
|
||||
Image::deleteAllImages(_PS_PROD_IMG_DIR_);
|
||||
Image::clearTmpDir();
|
||||
break;
|
||||
case 'manufacturer' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang');
|
||||
foreach (scandir(_PS_MANU_IMG_DIR_) AS $d)
|
||||
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
|
||||
unlink(_PS_MANU_IMG_DIR_.$d);
|
||||
Image::clearTmpDir();
|
||||
break;
|
||||
case 'Suppliers' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang');
|
||||
foreach (scandir(_PS_SUPP_IMG_DIR_) AS $d)
|
||||
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
|
||||
unlink(_PS_SUPP_IMG_DIR_.$d);
|
||||
Image::clearTmpDir();
|
||||
break;
|
||||
case 'attribute' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang');
|
||||
break;
|
||||
case 'attributegroup' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group');
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang');
|
||||
break;
|
||||
case 'currency' :
|
||||
case 'customer' :
|
||||
case 'zone' :
|
||||
case 'state' :
|
||||
Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`');
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -138,7 +138,7 @@ class Socolissimo extends CarrierModule
|
||||
PRIMARY KEY (`id_cart`,`id_customer`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
|
||||
|
||||
if(!Db::getInstance()->Execute($sql))
|
||||
if(!Db::getInstance()->execute($sql))
|
||||
return false;
|
||||
|
||||
//add carrier in back office
|
||||
@@ -153,7 +153,7 @@ class Socolissimo extends CarrierModule
|
||||
$so_id = (int)Configuration::get('SOCOLISSIMO_CARRIER_ID');
|
||||
|
||||
if (!parent::uninstall()
|
||||
OR !Db::getInstance()->Execute('DROP TABLE IF EXISTS`'._DB_PREFIX_.'socolissimo_delivery_info`')
|
||||
OR !Db::getInstance()->execute('DROP TABLE IF EXISTS`'._DB_PREFIX_.'socolissimo_delivery_info`')
|
||||
OR !$this->unregisterHook('extraCarrier')
|
||||
OR !$this->unregisterHook('payment')
|
||||
OR !$this->unregisterHook('AdminOrder')
|
||||
@@ -533,7 +533,7 @@ class Socolissimo extends CarrierModule
|
||||
$groups = Group::getgroups(true);
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'carrier_group VALUE (\''.(int)($carrier->id).'\',\''.(int)($group['id_group']).'\')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'carrier_group VALUE (\''.(int)($carrier->id).'\',\''.(int)($group['id_group']).'\')');
|
||||
}
|
||||
$rangePrice = new RangePrice();
|
||||
$rangePrice->id_carrier = $carrier->id;
|
||||
@@ -550,9 +550,9 @@ class Socolissimo extends CarrierModule
|
||||
$zones = Zone::getZones(true);
|
||||
foreach ($zones as $zone)
|
||||
{
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'carrier_zone VALUE (\''.(int)($carrier->id).'\',\''.(int)($zone['id_zone']).'\')');
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'delivery VALUE (\'\',\''.(int)($carrier->id).'\',\''.(int)($rangePrice->id).'\',NULL,\''.(int)($zone['id_zone']).'\',\'1\')');
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'delivery VALUE (\'\',\''.(int)($carrier->id).'\',NULL,\''.(int)($rangeWeight->id).'\',\''.(int)($zone['id_zone']).'\',\'1\')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'carrier_zone VALUE (\''.(int)($carrier->id).'\',\''.(int)($zone['id_zone']).'\')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'delivery VALUE (\'\',\''.(int)($carrier->id).'\',\''.(int)($rangePrice->id).'\',NULL,\''.(int)($zone['id_zone']).'\',\'1\')');
|
||||
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'delivery VALUE (\'\',\''.(int)($carrier->id).'\',NULL,\''.(int)($rangeWeight->id).'\',\''.(int)($zone['id_zone']).'\',\'1\')');
|
||||
}
|
||||
//copy logo
|
||||
if (!copy(dirname(__FILE__).'/socolissimo.jpg',_PS_SHIP_IMG_DIR_.'/'.$carrier->id.'.jpg'))
|
||||
|
||||
@@ -100,7 +100,7 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
|
||||
'RDV' => 'Livraison sur Rendez-vous');
|
||||
|
||||
$db = Db::getInstance();
|
||||
$db->ExecuteS('SELECT * FROM '._DB_PREFIX_.'socolissimo_delivery_info WHERE id_cart = '.(int)($idCart).' AND id_customer ='.(int)($idCustomer));
|
||||
$db->executeS('SELECT * FROM '._DB_PREFIX_.'socolissimo_delivery_info WHERE id_cart = '.(int)($idCart).' AND id_customer ='.(int)($idCustomer));
|
||||
$numRows = (int)($db->NumRows());
|
||||
if ($numRows == 0)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
|
||||
'.(isset($soParams['CEDOORCODE1']) ? '\''.pSQL($soParams['CEDOORCODE1']).'\'' : '\'\'').',
|
||||
'.(isset($soParams['CEDOORCODE2']) ? '\''.pSQL($soParams['CEDOORCODE2']).'\'' : '\'\'').')';
|
||||
|
||||
if (Db::getInstance()->Execute($sql))
|
||||
if (Db::getInstance()->execute($sql))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -199,7 +199,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
}
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ class StatsBestCustomers extends ModuleGrid
|
||||
}
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,6 @@ class StatsBestManufacturers extends ModuleGrid
|
||||
}
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance()->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance()->executeS($this->_query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +148,6 @@ class StatsBestSuppliers extends ModuleGrid
|
||||
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ class StatsBestVouchers extends ModuleGrid
|
||||
}
|
||||
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class StatsCarrier extends ModuleGraph
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
'.$stateQuery.'
|
||||
GROUP BY c.`id_carrier`';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[] = $row['total'];
|
||||
|
||||
@@ -115,7 +115,7 @@ class StatsCatalog extends Module
|
||||
'.$this->_where.'
|
||||
AND p.`active` = 1
|
||||
GROUP BY p.`id_product`';
|
||||
$precalc = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$precalc = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
$precalc2 = array();
|
||||
foreach ($precalc as $array)
|
||||
@@ -128,7 +128,7 @@ class StatsCatalog extends Module
|
||||
WHERE p.`active` = 1
|
||||
'.(sizeof($precalc2) ? 'AND p.`id_product` NOT IN ('.implode(',', $precalc2).')' : '').'
|
||||
'.$this->_where;
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
return array('total' => Db::getInstance(_PS_USE_SQL_SLAVE_)->NumRows(), 'result' => $result);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class StatsCheckUp extends Module
|
||||
$sql = 'SELECT l.*
|
||||
FROM '._DB_PREFIX_.'lang l'
|
||||
.$this->context->shop->sqlAsso('lang', 'l');
|
||||
$languages = $db->ExecuteS($sql);
|
||||
$languages = $db->executeS($sql);
|
||||
|
||||
$arrayColors = array(
|
||||
0 => '<img src="../modules/'.$this->name.'/red.png" alt="'.$this->l('bad').'" />',
|
||||
@@ -125,7 +125,7 @@ class StatsCheckUp extends Module
|
||||
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->context->language->id.$this->context->shop->sqlLang('pl').')
|
||||
'.$this->context->shop->sqlAsso('product', 'p').'
|
||||
ORDER BY '.$orderBy;
|
||||
$result = $db->ExecuteS($sql);
|
||||
$result = $db->executeS($sql);
|
||||
|
||||
if (!$result)
|
||||
return $this->l('No product found');
|
||||
@@ -194,7 +194,7 @@ class StatsCheckUp extends Module
|
||||
$totals['images'] += (int)$scores['images'];
|
||||
$totals['sales'] += (int)$scores['sales'];
|
||||
$totals['stock'] += (int)$scores['stock'];
|
||||
$descriptions = $db->ExecuteS('SELECT l.iso_code, pl.description FROM '._DB_PREFIX_.'product_lang pl LEFT JOIN '._DB_PREFIX_.'lang l ON pl.id_lang = l.id_lang WHERE id_product = '.(int)$row['id_product'].$this->context->shop->sqlLang('pl'));
|
||||
$descriptions = $db->executeS('SELECT l.iso_code, pl.description FROM '._DB_PREFIX_.'product_lang pl LEFT JOIN '._DB_PREFIX_.'lang l ON pl.id_lang = l.id_lang WHERE id_product = '.(int)$row['id_product'].$this->context->shop->sqlLang('pl'));
|
||||
foreach ($descriptions as $description)
|
||||
{
|
||||
$row['desclength_'.$description['iso_code']] = Tools::strlen(strip_tags($description['description']));
|
||||
|
||||
@@ -63,7 +63,7 @@ class StatsEquipment extends ModuleGraph
|
||||
LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_guest` = c.`id_guest`
|
||||
WHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
'.$this->sqlShopRestriction(false, 'c');
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql, false);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql, false);
|
||||
|
||||
$calcArray = array('jsOK' => 0, 'jsKO' => 0, 'javaOK' => 0, 'javaKO' => 0, 'wmpOK' => 0, 'wmpKO' => 0, 'qtOK' => 0, 'qtKO' => 0, 'realOK' => 0, 'realKO' => 0, 'flashOK' => 0, 'flashKO' => 0, 'directorOK' => 0, 'directorKO' => 0);
|
||||
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
|
||||
@@ -169,7 +169,7 @@ class StatsEquipment extends ModuleGraph
|
||||
|
||||
protected function getData($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
$this->_values = array();
|
||||
$i = 0;
|
||||
foreach ($result as $row)
|
||||
|
||||
@@ -124,7 +124,7 @@ class StatsForecast extends Module
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY '.$dateFromGInvoice.'
|
||||
ORDER BY fix_date';
|
||||
$result = $db->ExecuteS($sql, false);
|
||||
$result = $db->executeS($sql, false);
|
||||
|
||||
$dataTable = array();
|
||||
if ($this->context->cookie->stats_granularity == 10)
|
||||
@@ -170,7 +170,7 @@ class StatsForecast extends Module
|
||||
WHERE c.date_add BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
'.$this->sqlShopRestriction(false, 'c').'
|
||||
GROUP BY '.$dateFromGAdd;
|
||||
$visits = Db::getInstance()->ExecuteS($sql, false);
|
||||
$visits = Db::getInstance()->executeS($sql, false);
|
||||
while ($row = $db->nextRow($visits))
|
||||
$visitArray[$row['fix_date']] = $row['visits'];
|
||||
|
||||
@@ -183,7 +183,7 @@ class StatsForecast extends Module
|
||||
AND o.invoice_date BETWEEN '.ModuleGraph::getDateBetween()
|
||||
.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY '.$dateFromGInvoice;
|
||||
$discounts = Db::getInstance()->ExecuteS($sql, false);
|
||||
$discounts = Db::getInstance()->executeS($sql, false);
|
||||
while ($row = $db->nextRow($discounts))
|
||||
$discountArray[$row['fix_date']] = $row['total'];
|
||||
|
||||
@@ -504,7 +504,7 @@ class StatsForecast extends Module
|
||||
'.$where.'
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY p.id_category_default';
|
||||
$ca['cat'] = Db::getInstance()->ExecuteS($sql);
|
||||
$ca['cat'] = Db::getInstance()->executeS($sql);
|
||||
uasort($ca['cat'], 'statsforecast_sort');
|
||||
|
||||
$langValues = '';
|
||||
@@ -512,7 +512,7 @@ class StatsForecast extends Module
|
||||
FROM `'._DB_PREFIX_.'lang` l
|
||||
'.$this->context->shop->sqlAsso('lang', 'l').'
|
||||
WHERE l.active = 1';
|
||||
$languages = Db::getInstance()->ExecuteS($sql);
|
||||
$languages = Db::getInstance()->executeS($sql);
|
||||
foreach ($languages as $language)
|
||||
$langValues .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_products / o.conversion_rate, 0)) as '.pSQL($language['iso_code']).',';
|
||||
$langValues = rtrim($langValues, ',');
|
||||
@@ -549,7 +549,7 @@ class StatsForecast extends Module
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY o.module
|
||||
ORDER BY total DESC';
|
||||
$ca['payment'] = Db::getInstance()->ExecuteS($sql);
|
||||
$ca['payment'] = Db::getInstance()->executeS($sql);
|
||||
|
||||
$sql = 'SELECT z.name, SUM(o.total_products / o.conversion_rate) as total, COUNT(*) as nb
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
@@ -561,7 +561,7 @@ class StatsForecast extends Module
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY c.id_zone
|
||||
ORDER BY total DESC';
|
||||
$ca['zones'] = Db::getInstance()->ExecuteS($sql);
|
||||
$ca['zones'] = Db::getInstance()->executeS($sql);
|
||||
|
||||
$sql = 'SELECT cu.name, SUM(o.total_products / o.conversion_rate) as total, COUNT(*) as nb
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
@@ -573,7 +573,7 @@ class StatsForecast extends Module
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY o.id_currency
|
||||
ORDER BY total DESC';
|
||||
$ca['currencies'] = Db::getInstance()->ExecuteS($sql);
|
||||
$ca['currencies'] = Db::getInstance()->executeS($sql);
|
||||
|
||||
$sql = 'SELECT SUM(total_products / o.conversion_rate) as total, COUNT(*) AS nb
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
@@ -593,7 +593,7 @@ class StatsForecast extends Module
|
||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY pac.id_attribute';
|
||||
$ca['attributes'] = Db::getInstance()->ExecuteS($sql);
|
||||
$ca['attributes'] = Db::getInstance()->executeS($sql);
|
||||
|
||||
return $ca;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ function show_countries($id_lang, $nb_by_line = 7)
|
||||
|
||||
$output = '<style type="text/css">.country{cursor: pointer;} .country:hover{text-decoration: underline;}</style>
|
||||
<script type="text/javascript">$(document).ready(_registerClickOnCountry);</script>';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT cl.`id_country`, `name`, `iso_code` FROM `'._DB_PREFIX_.'country_lang` cl
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT cl.`id_country`, `name`, `iso_code` FROM `'._DB_PREFIX_.'country_lang` cl
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country`
|
||||
WHERE `id_lang` = \''.(int)($id_lang).'\' ORDER BY `name` ASC;');
|
||||
$separator = 0;
|
||||
@@ -56,7 +56,7 @@ function show_buttons($id_lang, $id_country)
|
||||
$output = '<script type="text/javascript">$(document).ready(_registerClickButtons);</script>
|
||||
<span id="selectinfo" style="text-align: center;"></span> ';
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT cl.`id_country`, `name`, `iso_code`, `x`, `y` FROM `'._DB_PREFIX_.'country_lang` cl
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT cl.`id_country`, `name`, `iso_code`, `x`, `y` FROM `'._DB_PREFIX_.'country_lang` cl
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country`
|
||||
LEFT JOIN `'._DB_PREFIX_.'location_coords` lc ON c.`id_country` = lc.`id_country`
|
||||
WHERE `id_lang` = \''.(int)($id_lang).'\' AND cl.`id_country`= \''.(int)($id_country).'\';');
|
||||
@@ -80,8 +80,8 @@ function insert_coords($id_lang, $id_country, $x, $y)
|
||||
{
|
||||
if (!is_numeric($id_lang) || !is_numeric($id_country) || !is_numeric($x) || !is_numeric($y))
|
||||
return ("error");
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'location_coords` WHERE `id_country` = \''.$id_country.'\';');
|
||||
if (!Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'location_coords` (`x`, `y`, `id_country`) VALUES (\''.(int)($x).'\', \''.(int)($y).'\', \''.(int)($id_country).'\');'))
|
||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'location_coords` WHERE `id_country` = \''.$id_country.'\';');
|
||||
if (!Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'location_coords` (`x`, `y`, `id_country`) VALUES (\''.(int)($x).'\', \''.(int)($y).'\', \''.(int)($id_country).'\');'))
|
||||
echo("error while inserting data<br />");
|
||||
return (show_countries($id_lang));
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ function drawCircles($image)
|
||||
|
||||
function getTotalElements()
|
||||
{
|
||||
$result = Db::getInstance()->ExecuteS('SELECT COUNT(`id_address`) as total FROM `'._DB_PREFIX_.'address` WHERE deleted = 0 AND id_customer IS NOT NULL AND id_customer != 0');
|
||||
$result = Db::getInstance()->executeS('SELECT COUNT(`id_address`) as total FROM `'._DB_PREFIX_.'address` WHERE deleted = 0 AND id_customer IS NOT NULL AND id_customer != 0');
|
||||
return (isset($result[0]) ? $result[0]['total'] : 0);
|
||||
}
|
||||
|
||||
function getCoords()
|
||||
{
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT `x`, `y`, COUNT(`id_address`) AS total
|
||||
return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `x`, `y`, COUNT(`id_address`) AS total
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'location_coords` lc ON lc.`id_country`=a.`id_country`
|
||||
WHERE deleted = 0 AND id_customer IS NOT NULL AND id_customer != 0
|
||||
|
||||
@@ -86,7 +86,7 @@ class StatsGeoLocation extends Module
|
||||
|
||||
if ( !parent::install() OR !$this->registerHook('AdminStatsModules'))
|
||||
return false;
|
||||
if (!Db::getInstance()->Execute('
|
||||
if (!Db::getInstance()->execute('
|
||||
CREATE TABLE `'._DB_PREFIX_.'location_coords` (
|
||||
`id_location_coords` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`x` int(4) NOT NULL,
|
||||
@@ -98,7 +98,7 @@ class StatsGeoLocation extends Module
|
||||
|
||||
$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`;');
|
||||
$result = Db::getInstance()->executeS('SELECT `id_country`, `iso_code` FROM `'._DB_PREFIX_.'country`;');
|
||||
foreach ($result as $index => $row)
|
||||
{
|
||||
if (isset($countries[$row['iso_code']]))
|
||||
@@ -109,14 +109,14 @@ class StatsGeoLocation extends Module
|
||||
$flag = 1;
|
||||
}
|
||||
}
|
||||
return Db::getInstance()->Execute($query.';');
|
||||
return Db::getInstance()->execute($query.';');
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
return (Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'location_coords`'));
|
||||
return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'location_coords`'));
|
||||
}
|
||||
|
||||
function hookAdminStatsModules()
|
||||
|
||||
@@ -68,7 +68,7 @@ class StatsLive extends Module
|
||||
AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
|
||||
GROUP BY c.id_connections
|
||||
ORDER BY u.firstname, u.lastname';
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
return array($results, Db::getInstance()->NumRows());
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class StatsLive extends Module
|
||||
ORDER BY c.date_add DESC';
|
||||
}
|
||||
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
return array($results, Db::getInstance()->NumRows());
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ class StatsNewsletter extends ModuleGraph
|
||||
|
||||
protected function setAllTimeValues($layers)
|
||||
{
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query2.$this->getDate());
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate());
|
||||
foreach ($result1 AS $row)
|
||||
$this->_values[0][(int)(substr($row['newsletter_date_add'], 0, 4))] += 1;
|
||||
if ($result2)
|
||||
@@ -130,8 +130,8 @@ class StatsNewsletter extends ModuleGraph
|
||||
|
||||
protected function setYearValues($layers)
|
||||
{
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query2.$this->getDate());
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate());
|
||||
foreach ($result1 AS $row)
|
||||
$this->_values[0][(int)(substr($row['newsletter_date_add'], 5, 2))] += 1;
|
||||
if ($result2)
|
||||
@@ -143,8 +143,8 @@ class StatsNewsletter extends ModuleGraph
|
||||
|
||||
protected function setMonthValues($layers)
|
||||
{
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query2.$this->getDate());
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate());
|
||||
foreach ($result1 AS $row)
|
||||
$this->_values[0][(int)(substr($row['newsletter_date_add'], 8, 2))] += 1;
|
||||
if ($result2)
|
||||
@@ -156,8 +156,8 @@ class StatsNewsletter extends ModuleGraph
|
||||
|
||||
protected function setDayValues($layers)
|
||||
{
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query2.$this->getDate());
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate());
|
||||
foreach ($result1 AS $row)
|
||||
$this->_values[0][(int)(substr($row['newsletter_date_add'], 11, 2))] += 1;
|
||||
if ($result2)
|
||||
|
||||
@@ -59,7 +59,7 @@ class StatsOrigin extends ModuleGraph
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction().'
|
||||
AND date_add BETWEEN '.$dateBetween;
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql, false);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql, false);
|
||||
$websites = array($directLink => 0);
|
||||
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER, 'c').'
|
||||
GROUP BY c.id_gender';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
$gendersResults = array();
|
||||
foreach ($result as $row)
|
||||
@@ -262,7 +262,7 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
WHERE a.id_customer != 0
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER, 'cu').'
|
||||
GROUP BY c.`id_country`';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[] = $row['total'];
|
||||
@@ -278,7 +278,7 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY c.`id_currency`';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[] = $row['total'];
|
||||
@@ -294,7 +294,7 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY c.`id_lang`';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[] = $row['total'];
|
||||
|
||||
@@ -108,7 +108,7 @@ class StatsProduct extends ModuleGraph
|
||||
WHERE pl.`id_lang` = '.(int)($id_lang).'
|
||||
'.(Tools::getValue('id_category') ? 'AND cp.id_category = '.(int)(Tools::getValue('id_category')) : '').'
|
||||
ORDER BY pl.`name`';
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
}
|
||||
|
||||
private function getSales($id_product, $id_lang)
|
||||
@@ -120,7 +120,7 @@ class StatsProduct extends ModuleGraph
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
AND o.valid = 1
|
||||
AND od.product_id = '.(int)($id_product);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
}
|
||||
|
||||
private function getCrossSales($id_product, $id_lang)
|
||||
@@ -143,7 +143,7 @@ class StatsProduct extends ModuleGraph
|
||||
AND od.product_id != '.(int)$id_product.'
|
||||
GROUP BY od.product_id
|
||||
ORDER BY pqty DESC';
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
}
|
||||
|
||||
public function hookAdminStatsModules($params)
|
||||
@@ -375,7 +375,7 @@ class StatsProduct extends ModuleGraph
|
||||
$assocNames[$id_product_attribute] = $list;
|
||||
}
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[] = $row['total'];
|
||||
@@ -388,7 +388,7 @@ class StatsProduct extends ModuleGraph
|
||||
{
|
||||
for ($i = 0; $i < $layers; $i++)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query[$i]);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]);
|
||||
foreach ($result AS $row)
|
||||
$this->_values[$i][(int)(substr($row['date_add'], 0, 4))] += $row['total'];
|
||||
}
|
||||
@@ -398,7 +398,7 @@ class StatsProduct extends ModuleGraph
|
||||
{
|
||||
for ($i = 0; $i < $layers; $i++)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query[$i]);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]);
|
||||
foreach ($result AS $row)
|
||||
$this->_values[$i][(int)(substr($row['date_add'], 5, 2))] += $row['total'];
|
||||
}
|
||||
@@ -408,7 +408,7 @@ class StatsProduct extends ModuleGraph
|
||||
{
|
||||
for ($i = 0; $i < $layers; $i++)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query[$i]);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]);
|
||||
foreach ($result AS $row)
|
||||
$this->_values[$i][(int)(substr($row['date_add'], 8, 2))] += $row['total'];
|
||||
}
|
||||
@@ -418,7 +418,7 @@ class StatsProduct extends ModuleGraph
|
||||
{
|
||||
for ($i = 0; $i < $layers; $i++)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query[$i]);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]);
|
||||
foreach ($result AS $row)
|
||||
$this->_values[$i][(int)(substr($row['date_add'], 11, 2))] += $row['total'];
|
||||
}
|
||||
|
||||
@@ -150,14 +150,14 @@ class StatsRegistrations extends ModuleGraph
|
||||
|
||||
protected function setAllTimeValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
foreach ($result AS $row)
|
||||
$this->_values[(int)(substr($row['date_add'], 0, 4))]++;
|
||||
}
|
||||
|
||||
protected function setYearValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
foreach ($result AS $row)
|
||||
{
|
||||
$mounth = (int)substr($row['date_add'], 5, 2);
|
||||
@@ -169,14 +169,14 @@ class StatsRegistrations extends ModuleGraph
|
||||
|
||||
protected function setMonthValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
foreach ($result AS $row)
|
||||
$this->_values[(int)(substr($row['date_add'], 8, 2))]++;
|
||||
}
|
||||
|
||||
protected function setDayValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate());
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate());
|
||||
foreach ($result AS $row)
|
||||
$this->_values[(int)(substr($row['date_add'], 11, 2))]++;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class StatsSales extends ModuleGraph
|
||||
|
||||
protected function setAllTimeValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
foreach ($result AS $row)
|
||||
if ($this->_option == 1)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ class StatsSales extends ModuleGraph
|
||||
|
||||
protected function setYearValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
foreach ($result AS $row) {
|
||||
$mounth = (int)substr($row['invoice_date'], 5, 2);
|
||||
if ($this->_option == 1)
|
||||
@@ -203,7 +203,7 @@ class StatsSales extends ModuleGraph
|
||||
|
||||
protected function setMonthValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
foreach ($result AS $row)
|
||||
if ($this->_option == 1)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ class StatsSales extends ModuleGraph
|
||||
|
||||
protected function setDayValues($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2);
|
||||
foreach ($result AS $row)
|
||||
if ($this->_option == 1)
|
||||
{
|
||||
@@ -229,7 +229,7 @@ class StatsSales extends ModuleGraph
|
||||
|
||||
private function getStatesData()
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT osl.`name`, COUNT(oh.`id_order`) as total
|
||||
FROM `'._DB_PREFIX_.'order_state` os
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($this->getLang()).')
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user