// little fix sql categories and product

This commit is contained in:
vChabot
2012-05-15 09:46:04 +00:00
parent 7a0c98aa13
commit c1290cebae
4 changed files with 23 additions and 7 deletions
@@ -158,7 +158,7 @@ class AdminCategoriesControllerCore extends AdminController
$this->_join = Shop::addSqlAssociation('category', 'a');
// we add restriction for shop
if (Shop::getContext() == Shop::CONTEXT_SHOP && $is_multishop)
$this->_where = ' AND cs.`id_shop` = '.(int)Context::getContext()->shop->id;
$this->_where = ' AND category_shop.`id_shop` = '.(int)Context::getContext()->shop->id;
$categories_tree = $this->_category->getParentsCategories();
if (empty($categories_tree)
@@ -271,8 +271,7 @@ class AdminProductsControllerCore extends AdminController
$orderWay = 'ASC';
}
$alias = (Shop::getContext() != Shop::CONTEXT_SHOP) ? 'product_shop': 'sa';
$this->_select .= ', '.$alias.'.`active`';
$this->_select .= ', sa.`active`';
if (!Tools::isSubmit('productFilter_active'))
$this->_filter = '';
parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, $this->context->shop->id);