/** * Returns search products conditions * * @param \XLite\Core\CommonCell $cnd Initial search conditions * * @return \XLite\Core\CommonCell */ protected function getSearchConditions(\XLite\Core\CommonCell $cnd) { $cnd = parent::getSearchConditions($cnd); $cnd->{\XLite\Model\Repo\Product::P_SEARCH_IN_SUBCATS} = true; if ($this->getCategoryId()) { $cnd->{\XLite\Model\Repo\Product::P_CATEGORY_ID} = $this->getCategoryId(); } if ($this->getMaxItemsCount()) { $cnd->{\XLite\Model\Repo\Product::P_LIMIT} = array(0, $this->getMaxItemsCount()); } return $cnd; }
/** * Returns search products conditions * * @param \XLite\Core\CommonCell $cnd Initial search conditions * * @return \XLite\Core\CommonCell */ protected function getSearchConditions(\XLite\Core\CommonCell $cnd) { $cnd = parent::getSearchConditions($cnd); if ($this->getMaxItemsCount()) { $cnd->{\XLite\Model\Repo\Product::P_LIMIT} = array(0, $this->getMaxItemsCount()); } return $cnd; }