source/Application/Component/Widget/ArticleDetails.php
public function getDefaultSorting()
    {
        $aSorting = parent::getDefaultSorting();

        $oCategory = $this->getActiveCategory();

        if ($this->getListType() != 'search' && $oCategory && $oCategory instanceof \OxidEsales\Eshop\Application\Model\Category) {
            if ($sSortBy = $oCategory->getDefaultSorting()) {
                $sSortDir = ($oCategory->getDefaultSortingMode()) ? "desc" : "asc";
                $aSorting = ['sortby' => $sSortBy, 'sortdir' => $sSortDir];
            }
        }

        return $aSorting;
    }
public function getDefaultSorting()
    {
        $aSorting = parent::getDefaultSorting();

        $oCategory = $this->getActiveCategory();

        if ($this->getListType() != 'search' && $oCategory && $oCategory instanceof \OxidEsales\Eshop\Application\Model\Category) {
            if ($sSortBy = $oCategory->getDefaultSorting()) {
                $sSortDir = ($oCategory->getDefaultSortingMode()) ? "desc" : "asc";
                $aSorting = ['sortby' => $sSortBy, 'sortdir' => $sSortDir];
            }
        }

        return $aSorting;
    }
public function getDefaultSorting ( ) { $ aSorting = parent :: getDefaultSorting ( ) ; $ oCategory = $ this -> getActiveCategory ( ) ; if ( $ this -> getListType ( ) != 'search' && $ oCategory && $ oCategory instanceof \ OxidEsales \ Eshop \ Application \ Model \ Category ) { if ( $ sSortBy = $ oCategory -> getDefaultSorting ( ) ) { $ sSortDir = ( $ oCategory -> getDefaultSortingMode ( ) ) ? "desc" : "asc" ; $ aSorting = [ 'sortby' => $ sSortBy , 'sortdir' => $ sSortDir ] ; } } return $ aSorting ; }
Returns default category sorting for selected category.

@return array
Returns default category sorting for selected category .