View Issue Details

IDProjectCategoryView StatusLast Update
0006968OXID eShop (all versions)2.4. Administer productspublic2019-04-09 11:52
ReporterDaniel Grimm 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version6.1.3 
Summary0006968: In der ManufacturerMainAjax.php ist der Aufruf des 'blVariantsSelection' config params falshc
Description$config->getRequestParameter('blVariantsSelection')

anstatt

$config->getConfigParam('blVariantsSelection')
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
MySQL VersionNot defined

Activities

QA

2019-04-05 15:14

administrator   ~0012835

What makes you say that?
The parameter is read from the config and not from the URL. Therefore it should read as follows:

$config->getConfigParam('blVariantsSelection')
instead of
$config->getRequestParameter('blVariantsSelection')


- es -

Daniel Grimm

2019-04-08 06:16

reporter   ~0012836

protected function _getQuery()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        // looking for table/view
        $articlesViewName = $this->_getViewName('oxarticles');
        $objectToCategoryViewName = $this->_getViewName('oxobject2category');
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $manufacturerId = $config->getRequestParameter('oxid');
        $syncedManufacturerId = $config->getRequestParameter('synchoxid');
        // Manufacturer selected or not ?
        if (!$manufacturerId) {
            // performance
            $query = ' from ' . $articlesViewName . ' where ' . $articlesViewName . '.oxshopid="' . $config->getShopId() . '" and 1 ';
            $query .= $config->getRequestParameter('blVariantsSelection') ? '' : " and $articlesViewName.oxparentid = '' and $articlesViewName.oxmanufacturerid != " . $database->quote($syncedManufacturerId);
        } elseif ($syncedManufacturerId && $syncedManufacturerId != $manufacturerId) {
            // selected category ?
            $query = " from $objectToCategoryViewName left join $articlesViewName on ";
            $query .= $config->getRequestParameter('blVariantsSelection') ? " ( $articlesViewName.oxid = $objectToCategoryViewName.oxobjectid or $articlesViewName.oxparentid = $objectToCategoryViewName.oxobjectid )" : " $articlesViewName.oxid = $objectToCategoryViewName.oxobjectid ";
            $query .= 'where ' . $articlesViewName . '.oxshopid="' . $config->getShopId() . '" and ' . $objectToCategoryViewName . '.oxcatnid = ' . $database->quote($manufacturerId) . ' and ' . $articlesViewName . '.oxmanufacturerid != ' . $database->quote($syncedManufacturerId);
            $query .= $config->getRequestParameter('blVariantsSelection') ? '' : " and $articlesViewName.oxparentid = '' ";
        } else {
            $query = " from $articlesViewName where $articlesViewName.oxmanufacturerid = " . $database->quote($manufacturerId);
            $query .= $config->getRequestParameter('blVariantsSelection') ? '' : " and $articlesViewName.oxparentid = '' ";
        }
        return $query;
    }

sorry for the missunderstanding ...

its exactly liku u say, but above is the code from ManufacturerMainAjax.php

and its read from request instead of config :)

michael_keiluweit

2019-04-09 11:52

developer   ~0012838

Hi DanielGrimm,

thanks for reporting the issue.
I already created a Pull Request to fix it. The affected lines are listed here: https://github.com/OXID-eSales/oxideshop_ce/pull/698/files

Kind regards
Michael Keiluweit