Hi everyone,
I'm having problems with overriding the class \XLite\View\ItemsList\Product\Customer\Search with the function getData().
The original class and function still gets called.
What are the usual things I should check? Is there a restriction on certain classes that cannot be overridden?
Code:
class Search extends \XLite\View\ItemsList\Product\Customer\Search implements \XLite\Base\IDecorator
{
/**
* Return products list
*
* @param \XLite\Core\CommonCell $cnd Search condition
* @param boolean $countOnly Return items list or only its size OPTIONAL
*
* @return array|integer
*/
protected function getData(\XLite\Core\CommonCell $cnd, $countOnly = false)
{
return \XLite\Core\Database::getRepo('\XLite\Model\Product')->search(
$cnd,
$countOnly
);
}
}