allow to display result or not if translation is present
This commit is contained in:
@@ -32,6 +32,7 @@ use Thelia\Core\Template\Loop\Argument\Argument;
|
||||
use Thelia\Log\Tlog;
|
||||
|
||||
use Thelia\Model\CategoryQuery;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Type\TypeCollection;
|
||||
use Thelia\Type;
|
||||
|
||||
@@ -156,7 +157,10 @@ class Category extends BaseLoop
|
||||
*
|
||||
* @todo : verify here if we want results for row without translations.
|
||||
*/
|
||||
$search->joinWithI18n($this->request->getSession()->get('locale', 'en_US'), \Criteria::INNER_JOIN);
|
||||
$search->joinWithI18n(
|
||||
$this->request->getSession()->get('locale', 'en_US'),
|
||||
(ConfigQuery::read("default_lang_without_translation", 1)) ? \Criteria::LEFT_JOIN : \Criteria::INNER_JOIN
|
||||
);
|
||||
|
||||
$categories = $this->search($search, $pagination);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user