View Single Post
  #1  
Old 03-10-2015, 11:14 AM
  zychen's Avatar 
zychen zychen is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 48
 

Question XC5 Problem overriding class with a module

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 ); } }
__________________
X-Cart 5.1.10
X-Cart Next 5.2.1 Beta
Reply With Quote