Hi folgendes Problem:
Ich erstelle ein Rabatt im Admin Panel mit 10 % und aktiviere ihn.
Danach Ordne ich eine Usergruppe hinzu (in meinem Fall war es ‘Shop-Admin’).
Nun deaktiviere ich den Rabatt und lande auf der login Seite des Admin panels. Im php.log steht folgende Fehelrmeldung:
PHP Notice: Undefined variable: sQAdd in /srv/www/htdocs/application/controllers/admin/discount_groups_ajax.php on line 64
Im Demo Shop lässt sich das nicht nachstellen. Jedoch in meinem Shop und in der downloadbaren Version 4.9.6 CE ist folgendes zu sehen in der discount_groups_ajax.php:
/**
* Returns SQL query for data to fetc
*
* @return string
*/
protected function _getQuery()
{
$oConfig = $this->getConfig();
// active AJAX component
$sGroupTable = $this->_getViewName('oxgroups');
$oDb = oxDb::getDb();
$sId = $oConfig->getRequestParameter('oxid');
$sSynchId = $oConfig->getRequestParameter('synchoxid');
// category selected or not ?
if (!$sId) {
$sQAdd = " from {$sGroupTable} where 1 ";
} else {
$sQAdd .= " from oxobject2discount, {$sGroupTable} where {$sGroupTable}.oxid=oxobject2discount.oxobjectid ";
$sQAdd .= " and oxobject2discount.oxdiscountid = " . $oDb->quote($sId) .
" and oxobject2discount.oxtype = 'oxgroups' ";
}
if ($sSynchId && $sSynchId != $sId) {
$sQAdd .= " and {$sGroupTable}.oxid not in ( select {$sGroupTable}.oxid " .
"from oxobject2discount, {$sGroupTable} where {$sGroupTable}.oxid=oxobject2discount.oxobjectid " .
" and oxobject2discount.oxdiscountid = " . $oDb->quote($sSynchId) .
" and oxobject2discount.oxtype = 'oxgroups' ) ";
}
return $sQAdd;
}
Er landet bei der 1. If Abfrage im else Zweig und bekommt einen Fehler, da $sQAdd noch nicht existiert.
Sehe ich doch richtig ist doch ein Bug oder??
P.S.: Ich benutze die Version 4.9.6 CE