35 $sPwrSearchFld = $sPwrSearchFld ? strtolower( $sPwrSearchFld ) :
"oxtitle";
40 foreach ( $oList as $key => $oArticle ) {
41 $sFieldName =
"oxarticles__{$sPwrSearchFld}";
44 if ( !
$myConfig->getConfigParam(
'blSkipFormatConversion' ) ) {
45 if ( $oArticle->$sFieldName->fldtype ==
"datetime" )
46 oxRegistry::get(
"oxUtilsDate")->convertDBDateTime( $oArticle->$sFieldName );
47 elseif ( $oArticle->$sFieldName->fldtype ==
"timestamp" )
48 oxRegistry::get(
"oxUtilsDate")->convertDBTimestamp( $oArticle->$sFieldName );
49 elseif ( $oArticle->$sFieldName->fldtype ==
"date" )
50 oxRegistry::get(
"oxUtilsDate")->convertDBDate( $oArticle->$sFieldName );
53 $oArticle->pwrsearchval = $oArticle->$sFieldName->value;
54 $oList[$key] = $oArticle;
61 if ( !$oArticle && $oList ) {
62 $oArticle = $oList->getBaseObject();
64 $this->_aViewData[
"pwrsearchfields"] = $oArticle ? $this->
getSearchFields() : null;
65 $this->_aViewData[
"pwrsearchfld"] = strtoupper( $sPwrSearchFld );
68 if ( isset( $aFilter[
"oxarticles"][$sPwrSearchFld] ) ) {
69 $this->_aViewData[
"pwrsearchinput"] = $aFilter[
"oxarticles"][$sPwrSearchFld];
76 if ( $sArtCat && strstr( $sArtCat,
"@@" ) !==
false ) {
77 list( $sType, $sValue ) = explode(
"@@", $sArtCat );
79 $this->_aViewData[
"art_category"] = $sArtCat;
85 $this->_aViewData[
"mnftree"] = $this->getManufacturerlist($sType, $sValue);
88 $this->_aViewData[
"vndtree"] = $this->
getVendorList($sType, $sValue);
90 return "article_list.tpl";
100 $aSkipFields = array(
"oxblfixedprice",
"oxvarselect",
"oxamitemid",
"oxamtaskid",
"oxpixiexport",
"oxpixiexported") ;
101 $oArticle =
oxNew(
"oxarticle" );
102 return array_diff( $oArticle->getFieldNames(), $aSkipFields );
118 $oCatTree =
oxNew(
"oxCategoryList" );
119 $oCatTree->loadList();
120 if ( $sType ===
'cat' ) {
121 foreach ($oCatTree as $oCategory ) {
122 if ( $oCategory->oxcategories__oxid->value == $sValue ) {
123 $oCategory->selected = 1;
142 $oMnfTree =
oxNew(
"oxManufacturerList");
143 $oMnfTree->loadManufacturerList();
144 if ( $sType ===
'mnf' ) {
145 foreach ($oMnfTree as $oManufacturer ) {
146 if ( $oManufacturer->oxmanufacturers__oxid->value == $sValue ) {
147 $oManufacturer->selected = 1;
166 $oVndTree =
oxNew(
"oxVendorList");
167 $oVndTree->loadVendorList();
168 if ( $sType ===
'vnd' ) {
169 foreach ($oVndTree as $oVendor ) {
170 if ( $oVendor->oxvendor__oxid->value == $sValue ) {
171 $oVendor->selected = 1;
191 $sTable = getViewName(
"oxarticles" );
192 $sQ .=
" and $sTable.oxparentid = '' ";
196 if ( $sArtCat && strstr( $sArtCat,
"@@" ) !==
false ) {
197 list( $sType, $sValue ) = explode(
"@@", $sArtCat );
204 $sO2CView = getViewName(
"oxobject2category" );
205 $sInsert =
"from $sTable left join $sO2CView on $sTable.oxid = $sO2CView.oxobjectid where $sO2CView.oxcatnid = ".oxDb::getDb()->quote($sValue).
" and ";
206 $sQ = $oStr->preg_replace(
"/from\s+$sTable\s+where/i", $sInsert, $sQ);
210 $sQ.=
" and $sTable.oxmanufacturerid = ".oxDb::getDb()->quote($sValue);
214 $sQ.=
" and $sTable.oxvendorid = ".oxDb::getDb()->quote($sValue);
234 if ( $sFolder && $sFolder !=
'-1' ) {
235 $this->_aWhere[getViewName(
"oxarticles" ).
".oxfolder"] = $sFolder;
249 $oArticle =
oxNew(
"oxarticle");
250 if ( $sOxId && $oArticle->load( $sOxId ) ) {