예제 #1
0
 /**
  * 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;
 }
예제 #2
0
파일: SaleBlock.php 프로젝트: kingsj/core
 /**
  * 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;
 }