[-] FO: Fix categories and products restriction for unidentified customers after upgrade
This commit is contained in:
1 parent
f137de9613
commit
05a64b9d66
2 files changed
+2
-2
No files matched your search
@@ -1048,7 +1048,7 @@ class CategoryCore extends ObjectModel
|
|||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
SELECT ctg.`id_group`
|
SELECT ctg.`id_group`
|
||||||
FROM '._DB_PREFIX_.'category_group ctg
|
FROM '._DB_PREFIX_.'category_group ctg
|
||||||
WHERE ctg.`id_category` = '.(int)$this->id.' AND ctg.`id_group` = 1
|
WHERE ctg.`id_category` = '.(int)$this->id.' AND ctg.`id_group` = '.(int)Group::getCurrent()->id.'
|
||||||
');
|
');
|
||||||
} else {
|
} else {
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
|
|||||||
+1
-1
@@ -4234,7 +4234,7 @@ class ProductCore extends ObjectModel
|
|||||||
SELECT ctg.`id_group`
|
SELECT ctg.`id_group`
|
||||||
FROM `'._DB_PREFIX_.'category_product` cp
|
FROM `'._DB_PREFIX_.'category_product` cp
|
||||||
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
||||||
WHERE cp.`id_product` = '.(int)$this->id.' AND ctg.`id_group` = 1');
|
WHERE cp.`id_product` = '.(int)$this->id.' AND ctg.`id_group` ='.(int)Group::getCurrent()->id);
|
||||||
else
|
else
|
||||||
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||||
SELECT cg.`id_group`
|
SELECT cg.`id_group`
|
||||||
|
|||||||
Reference in new issue
Block a user