protected function _getProductListFilterByParam( array $params, $catfilter = true, $textfilter = true, $attrfilter = true )
	{
		$sortdir = '+';
		$context = $this->_getContext();
		$config = $context->getConfig();

		$text = ( isset( $params['f-search-text'] ) ? (string) $params['f-search-text'] : '' );
		$catid = ( isset( $params['f-catalog-id'] ) ? (string) $params['f-catalog-id'] : '' );

		if( $catid == '' && $catfilter === true )
		{
			/** client/html/catalog/list/catid-default
			 * The default category ID used if none is given as parameter
			 *
			 * If users view a product list page without a category ID in the
			 * parameter list, the first found products are displayed with a
			 * random order. You can circumvent this by configuring a default
			 * category ID that should be used in this case (the ID of the root
			 * category is best for this). In most cases you can set this value
			 * via the administration interface of the shop application.
			 *
			 * @param string Category ID
			 * @since 2014.03
			 * @category User
			 * @category Developer
			 * @see client/html/catalog/list/size
			 * @see client/html/catalog/list/domains
			 */
			$catid = $config->get( 'client/html/catalog/list/catid-default', '' );
		}

		$page = $this->_getProductListPageByParam( $params );
		$size = $this->_getProductListSizeByParam( $params );
		$sort = $this->_getProductListSortByParam( $params, $sortdir );

		$filter = $this->_createProductListFilter( $text, $catid, $sort, $sortdir, $page, $size, $catfilter, $textfilter );

		if( $attrfilter === true ) {
			$this->_addAttributeFilterByParam( $params, $filter );
		}


		return $filter;
	}
protected function _getProductListFilterByParam( array $params, $catfilter = true, $textfilter = true, $attrfilter = true )
	{
		$sortdir = '+';
		$context = $this->_getContext();
		$config = $context->getConfig();

		$text = ( isset( $params['f-search-text'] ) ? (string) $params['f-search-text'] : '' );
		$catid = ( isset( $params['f-catalog-id'] ) ? (string) $params['f-catalog-id'] : '' );

		if( $catid == '' && $catfilter === true )
		{
			/** client/html/catalog/list/catid-default
			 * The default category ID used if none is given as parameter
			 *
			 * If users view a product list page without a category ID in the
			 * parameter list, the first found products are displayed with a
			 * random order. You can circumvent this by configuring a default
			 * category ID that should be used in this case (the ID of the root
			 * category is best for this). In most cases you can set this value
			 * via the administration interface of the shop application.
			 *
			 * @param string Category ID
			 * @since 2014.03
			 * @category User
			 * @category Developer
			 * @see client/html/catalog/list/size
			 * @see client/html/catalog/list/domains
			 */
			$catid = $config->get( 'client/html/catalog/list/catid-default', '' );
		}

		$page = $this->_getProductListPageByParam( $params );
		$size = $this->_getProductListSizeByParam( $params );
		$sort = $this->_getProductListSortByParam( $params, $sortdir );

		$filter = $this->_createProductListFilter( $text, $catid, $sort, $sortdir, $page, $size, $catfilter, $textfilter );

		if( $attrfilter === true ) {
			$this->_addAttributeFilterByParam( $params, $filter );
		}


		return $filter;
	}
protected function _getProductListFilterByParam ( array $ params , $ catfilter = true , $ textfilter = true , $ attrfilter = true ) { $ sortdir = '+' ; $ context = $ this -> _getContext ( ) ; $ config = $ context -> getConfig ( ) ; $ text = ( isset ( $ params [ 'f-search-text' ] ) ? ( string ) $ params [ 'f-search-text' ] : '' ) ; $ catid = ( isset ( $ params [ 'f-catalog-id' ] ) ? ( string ) $ params [ 'f-catalog-id' ] : '' ) ; if ( $ catid == '' && $ catfilter === true ) { /** client/html/catalog/list/catid-default
			 * The default category ID used if none is given as parameter
			 *
			 * If users view a product list page without a category ID in the
			 * parameter list, the first found products are displayed with a
			 * random order. You can circumvent this by configuring a default
			 * category ID that should be used in this case (the ID of the root
			 * category is best for this). In most cases you can set this value
			 * via the administration interface of the shop application.
			 *
			 * @param string Category ID
			 * @since 2014.03
			 * @category User
			 * @category Developer
			 * @see client/html/catalog/list/size
			 * @see client/html/catalog/list/domains
			 */ $ catid = $ config -> get ( 'client/html/catalog/list/catid-default' , '' ) ; } $ page = $ this -> _getProductListPageByParam ( $ params ) ; $ size = $ this -> _getProductListSizeByParam ( $ params ) ; $ sort = $ this -> _getProductListSortByParam ( $ params , $ sortdir ) ; $ filter = $ this -> _createProductListFilter ( $ text , $ catid , $ sort , $ sortdir , $ page , $ size , $ catfilter , $ textfilter ) ; if ( $ attrfilter === true ) { $ this -> _addAttributeFilterByParam ( $ params , $ filter ) ; } return $ filter ; }
Returns the filter from the given parameters for the product list.

@param array $params Associative list of parameters that should be used for filtering
@param boolean $catfilter True to include catalog criteria in product filter, false if not
@param boolean $textfilter True to include text criteria in product filter, false if not
@param boolean $attrfilter True to include attribute criteria in product filter, false if not
@return MW_Common_Criteria_Interface Search criteria object
Returns the filter from the given parameters for the product list .