131 public function init()
139 $sSearchParamForQuery = trim($oConfig->getRequestParameter(
'searchparam',
true));
142 $sInitialSearchCat = $this->_sSearchCatId = rawurldecode($oConfig->getRequestParameter(
'searchcnid'));
145 $sInitialSearchVendor = rawurldecode($oConfig->getRequestParameter(
'searchvendor'));
148 $sManufacturerParameter = $oConfig->getRequestParameter(
'searchmanufacturer');
149 $sInitialSearchManufacturer = $this->_sSearchManufacturer = rawurldecode($sManufacturerParameter);
151 $this->_blEmptySearch =
false;
152 if (!$sSearchParamForQuery && !$sInitialSearchCat && !$sInitialSearchVendor && !$sInitialSearchManufacturer) {
154 $this->_aArticleList = null;
155 $this->_blEmptySearch =
true;
161 if (!
$myConfig->getConfigParam(
'bl_perfLoadManufacturerTree')) {
162 $sInitialSearchManufacturer = null;
167 $oSearchHandler =
oxNew(
'oxsearch');
168 $oSearchList = $oSearchHandler->getSearchArticles(
169 $sSearchParamForQuery,
171 $sInitialSearchVendor,
172 $sInitialSearchManufacturer,
177 $this->_aArticleList = $oSearchList;
178 $this->_iAllArtCnt = 0;
181 if ($oSearchList->count()) {
182 $this->_iAllArtCnt = $oSearchHandler->getSearchArticleCount(
183 $sSearchParamForQuery,
185 $sInitialSearchVendor,
186 $sInitialSearchManufacturer
190 $iNrofCatArticles = (int)
$myConfig->getConfigParam(
'iNrofCatArticles');
191 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;
192 $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
206 if ($oConfig->getConfigParam(
'bl_rssSearch')) {
207 $oRss =
oxNew(
'oxrssfeed');
208 $sSearch = $oConfig->getRequestParameter(
'searchparam',
true);
209 $sCnid = $oConfig->getRequestParameter(
'searchcnid',
true);
210 $sVendor = $oConfig->getRequestParameter(
'searchvendor',
true);
211 $sManufacturer = $oConfig->getRequestParameter(
'searchmanufacturer',
true);
212 $sSearchArticlesTitle = $oRss->getSearchArticlesTitle($sSearch, $sCnid, $sVendor, $sManufacturer);
213 $sSearchArticlesUrl = $oRss->getSearchArticlesUrl($sSearch, $sCnid, $sVendor, $sManufacturer);
214 $this->
addRssFeed($sSearchArticlesTitle, $sSearchArticlesUrl,
'searchArticles');
232 foreach ($aArtList as $oArticle) {
236 $oArticle->appendStdLink($sAddDynParams);
238 $oArticle->appendLink($sAddDynParams);
251 $sAddParams .= ($sAddParams ?
'&' :
'') .
"listtype={$this->_sListType}";
254 if ($sParam = $oConfig->getRequestParameter(
'searchparam',
true)) {
255 $sAddParams .=
"&searchparam=" . rawurlencode($sParam);
258 if ($sParam = $oConfig->getRequestParameter(
'searchcnid')) {
259 $sAddParams .=
"&searchcnid=$sParam";
262 if ($sParam = rawurldecode($oConfig->getRequestParameter(
'searchvendor'))) {
263 $sAddParams .=
"&searchvendor=$sParam";
266 if ($sParam = rawurldecode($oConfig->getRequestParameter(
'searchmanufacturer'))) {
267 $sAddParams .=
"&searchmanufacturer=$sParam";
280 if ($this->_blSearchClass === null) {
281 $this->_blSearchClass =
false;
282 if (strtolower($this->
getConfig()->getRequestParameter(
'cl')) ==
'search') {
283 $this->_blSearchClass =
true;
317 if ($this->_aSimilarRecommListIds === null) {
318 $this->_aSimilarRecommListIds =
false;
321 if ($aList && $aList->count() > 0) {
322 $this->_aSimilarRecommListIds = $aList->arrayKeys();
336 if ($this->_sSearchParamForHtml === null) {
337 $this->_sSearchParamForHtml =
false;
339 $this->_sSearchParamForHtml = $this->
getConfig()->getRequestParameter(
'searchparam');
353 if ($this->_sSearchParam === null) {
354 $this->_sSearchParam =
false;
356 $this->_sSearchParam = rawurlencode($this->
getConfig()->getRequestParameter(
'searchparam',
true));
370 if ($this->_sSearchCatId === null) {
371 $this->_sSearchCatId =
false;
373 $this->_sSearchCatId = rawurldecode($this->
getConfig()->getRequestParameter(
'searchcnid'));
387 if ($this->_sSearchVendor === null) {
388 $this->_sSearchVendor =
false;
391 $this->_sSearchVendor = rawurldecode($this->
getConfig()->getRequestParameter(
'searchvendor'));
405 if ($this->_sSearchManufacturer === null) {
406 $this->_sSearchManufacturer =
false;
409 $sManufacturerParameter = $this->
getConfig()->getRequestParameter(
'searchmanufacturer');
410 $this->_sSearchManufacturer = rawurldecode($sManufacturerParameter);
424 if ($this->_oPageNavigation === null) {
425 $this->_oPageNavigation =
false;
455 $aPath[
'link'] = $this->
getLink();
468 return $this->
getConfig()->getConfigParam(
'blShowListDisplayType');
501 $sTitle .=
' ' .
oxRegistry::getLang()->translateString(
'HITS_FOR', $iBaseLanguage,
false);