24 $this->_aViewData[
'edit'] = $oArticle =
oxNew(
'oxarticle');
27 if ($soxId !=
"-1" && isset($soxId)) {
36 if ($oArticle->oxarticles__oxparentid->value) {
37 $oParentArticle =
oxNew(
"oxarticle");
38 $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
39 $this->_aViewData[
"parentarticle"] = $oParentArticle;
40 $this->_aViewData[
"oxparentid"] = $oArticle->oxarticles__oxparentid->value;
44 $sSelect =
"select sum(oxamount) from oxorderarticles ";
45 $sSelect .=
"where oxartid=" . $oDB->quote($soxId);
46 $this->_aViewData[
"totalordercnt"] = $iTotalOrderCnt = (float) $oDB->getOne($sSelect);
49 $sSelect =
"select sum(oxorderarticles.oxamount) from oxorderarticles, oxorder " .
50 "where (oxorder.oxpaid>0 or oxorder.oxsenddate > 0) and oxorderarticles.oxstorno != '1' " .
51 "and oxorderarticles.oxartid=" . $oDB->quote($soxId) .
52 "and oxorder.oxid =oxorderarticles.oxorderid";
53 $this->_aViewData[
"soldcnt"] = $iSoldCnt = (float) $oDB->getOne($sSelect);
56 $sSelect =
"select sum(oxamount) from oxorderarticles where oxstorno = '1' " .
57 "and oxartid=" . $oDB->quote($soxId);
58 $this->_aViewData[
"canceledcnt"] = $iCanceledCnt = (float) $oDB->getOne($sSelect);
61 $this->_aViewData[
"leftordercnt"] = $iTotalOrderCnt - $iSoldCnt - $iCanceledCnt;
64 $sSelect =
"select oxartid,sum(oxamount) as cnt from oxorderarticles " .
65 "group by oxartid order by cnt desc";
67 $rs = $oDB->execute($sSelect);
70 if ($rs !=
false && $rs->recordCount() > 0) {
73 if ($rs->fields[0] == $soxId) {
80 $this->_aViewData[
"postopten"] = $iTopPos;
81 $this->_aViewData[
"toptentotal"] = $iPos;
84 $this->_aViewData[
"afolder"] =
$myConfig->getConfigParam(
'aProductfolder');
85 $this->_aViewData[
"aSubclass"] =
$myConfig->getConfigParam(
'aArticleClasses');
87 return "article_overview.tpl";