36 $sPwrSearchFld = $sPwrSearchFld ? strtolower($sPwrSearchFld) :
"oxtitle";
41 foreach ($oList as $key => $oArticle) {
42 $sFieldName =
"oxarticles__{$sPwrSearchFld}";
45 if (!
$myConfig->getConfigParam(
'blSkipFormatConversion')) {
46 if ($oArticle->$sFieldName->fldtype ==
"datetime") {
47 oxRegistry::get(
"oxUtilsDate")->convertDBDateTime($oArticle->$sFieldName);
48 } elseif ($oArticle->$sFieldName->fldtype ==
"timestamp") {
49 oxRegistry::get(
"oxUtilsDate")->convertDBTimestamp($oArticle->$sFieldName);
50 } elseif ($oArticle->$sFieldName->fldtype ==
"date") {
55 $oArticle->pwrsearchval = $oArticle->$sFieldName->value;
56 $oList[$key] = $oArticle;
63 if (!$oArticle && $oList) {
64 $oArticle = $oList->getBaseObject();
66 $this->_aViewData[
"pwrsearchfields"] = $oArticle ? $this->
getSearchFields() : null;
67 $this->_aViewData[
"pwrsearchfld"] = strtoupper($sPwrSearchFld);
70 if (isset($aFilter[
"oxarticles"][$sPwrSearchFld])) {
71 $this->_aViewData[
"pwrsearchinput"] = $aFilter[
"oxarticles"][$sPwrSearchFld];
78 if ($sArtCat && strstr($sArtCat,
"@@") !==
false) {
79 list($sType, $sValue) = explode(
"@@", $sArtCat);
81 $this->_aViewData[
"art_category"] = $sArtCat;
87 $this->_aViewData[
"mnftree"] = $this->getManufacturerlist($sType, $sValue);
90 $this->_aViewData[
"vndtree"] = $this->
getVendorList($sType, $sValue);
92 return "article_list.tpl";
102 $aSkipFields = array(
"oxblfixedprice",
"oxvarselect",
"oxamitemid",
103 "oxamtaskid",
"oxpixiexport",
"oxpixiexported");
104 $oArticle =
oxNew(
"oxarticle");
106 return array_diff($oArticle->getFieldNames(), $aSkipFields);
122 $oCatTree =
oxNew(
"oxCategoryList");
123 $oCatTree->loadList();
124 if ($sType ===
'cat') {
125 foreach ($oCatTree as $oCategory) {
126 if ($oCategory->oxcategories__oxid->value == $sValue) {
127 $oCategory->selected = 1;
146 $oMnfTree =
oxNew(
"oxManufacturerList");
147 $oMnfTree->loadManufacturerList();
148 if ($sType ===
'mnf') {
149 foreach ($oMnfTree as $oManufacturer) {
150 if ($oManufacturer->oxmanufacturers__oxid->value == $sValue) {
151 $oManufacturer->selected = 1;
170 $oVndTree =
oxNew(
"oxVendorList");
171 $oVndTree->loadVendorList();
172 if ($sType ===
'vnd') {
173 foreach ($oVndTree as $oVendor) {
174 if ($oVendor->oxvendor__oxid->value == $sValue) {
175 $oVendor->selected = 1;
195 $sTable = getViewName(
"oxarticles");
196 $sQ .=
" and $sTable.oxparentid = '' ";
200 if ($sArtCat && strstr($sArtCat,
"@@") !==
false) {
201 list($sType, $sValue) = explode(
"@@", $sArtCat);
208 $sViewName = getViewName(
"oxobject2category");
209 $sInsert =
"from $sTable left join {$sViewName} on {$sTable}.oxid = {$sViewName}.oxobjectid " .
210 "where {$sViewName}.oxcatnid = " .
oxDb::getDb()->quote($sValue) .
" and ";
211 $sQ = $oStr->preg_replace(
"/from\s+$sTable\s+where/i", $sInsert, $sQ);
215 $sQ .=
" and $sTable.oxmanufacturerid = " .
oxDb::getDb()->quote($sValue);
219 $sQ .=
" and $sTable.oxvendorid = " .
oxDb::getDb()->quote($sValue);
239 if ($sFolder && $sFolder !=
'-1') {
240 $this->_aWhere[getViewName(
"oxarticles") .
".oxfolder"] = $sFolder;
252 $oArticle =
oxNew(
"oxarticle");
253 if ($sOxId && $oArticle->load($sOxId)) {