Esempio n. 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;
 }
Esempio n. 2
0
 /**
  * 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;
 }
Esempio n. 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;
 }