示例#1
0
 /**
  * Return params list to use for search
  * TODO refactor
  *
  * @return \XLite\Core\CommonCell
  */
 protected function getSearchCondition()
 {
     $result = parent::getSearchCondition();
     foreach (static::getSearchParams() as $modelParam => $requestParam) {
         $paramValue = $this->getParam($requestParam);
         if ('' !== $paramValue && 0 !== $paramValue) {
             $result->{$modelParam} = $paramValue;
         }
     }
     if ('directLink' != \XLite\Core\Config::getInstance()->General->show_out_of_stock_products) {
         $result->{\XLite\Model\Repo\Product::P_INVENTORY} = false;
     }
     return $result;
 }
示例#2
0
文件: Search.php 项目: kingsj/core
 /**
  * Return params list to use for search
  * TODO refactor
  *
  * @return \XLite\Core\CommonCell
  */
 protected function getSearchCondition()
 {
     $result = parent::getSearchCondition();
     foreach (\XLite\View\ItemsList\Product\Customer\Search::getSearchParams() as $modelParam => $requestParam) {
         $paramValue = $this->getParam($requestParam);
         if ('' !== $paramValue && 0 !== $paramValue) {
             $result->{$modelParam} = $paramValue;
         }
     }
     return $result;
 }
示例#3
0
 /**
  * Return params list to use for search
  *
  * @return \XLite\Core\CommonCell
  */
 protected function getSearchCondition()
 {
     $cnd = parent::getSearchCondition();
     $cnd->{\XLite\Module\XC\Upselling\Model\Repo\UpsellingProduct::SEARCH_PARENT_PRODUCT_ID} = $this->getProductId();
     return $cnd;
 }