Hi @
xgarb,
Perfect, seems like the mod is almost complete!
I do not think you need this 'moreThan10' condition though.
This error seems to be caused by a bug. The addTranslationJoins() method should have used linkLeft() method instead of leftJoin() one. I will report that.
As a workaround solution, try to add the following method to your \XLite\Module\XCExample\SearchRepoDemo\Model\Repo\ Product class
PHP Code:
protected function addTranslationJoins($queryBuilder, $alias, $translationsAlias, $code)
{
$queryBuilder->linkLeft(
$alias . '.translations',
$translationsAlias
);
return $queryBuilder;
}
Please, let me know if it fixes the problem.
Tony
Quote:
Originally Posted by xgarb
I have the following error:
[Semantical Error] line 0, col 314 near 'tt WHERE p.enabled': Error: 'tt' is already defined.
from this code
PHP Code:
protected function prepareCndSubstring(\Doctrine\ORM\QueryBuilder $queryBuilder, $value) { $queryBuilder->linkLeft('p.tags', 't'); $this->addTranslationJoins($queryBuilder, 't', 'tt', $this->getTranslationCode());
parent::prepareCndSubstring($queryBuilder, $value); }
in this file: XLite\Module\XC\ProductTags\Model\Repo\Product
I'm not sure what to do to stop the querybuilder adding the code in ProductTags repo?
T
|