// Replace shop->sqlAsso(), shop->sqlLang() and shop->sqlRestriction() with shop->addSqlAssociation(), shop->addSqlRestrictionOnLang() and shop->addSqlRestriction()

This commit is contained in:
rMalie
2011-10-17 09:46:08 +00:00
parent b0be0dd5ab
commit e6f45e54a6
60 changed files with 205 additions and 197 deletions
+2 -2
View File
@@ -1044,14 +1044,14 @@ class Ebay extends Module
$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->addSqlRestrictionOnLang('cl'));
foreach ($categoryList as $k => $c)
if (!isset($categoryConfigList[$c['id_category']]))
{
$productTest = Db::getInstance()->getRow('
SELECT pl.`name`, pl.`description`
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->id_lang.$this->context->shop->sqlLang('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->id_lang.$this->context->shop->addSqlRestrictionOnLang('pl').')
WHERE `id_category_default` = '.(int)$c['id_category']);
$id_category_ref_suggested = $ebay->getSuggestedCategories($c['name'].' '.$productTest['name']);
$id_ebay_category_suggested = Db::getInstance()->getValue('SELECT `id_ebay_category` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_category_ref` = '.(int)$id_category_ref_suggested);