Sorting in OXID eShop

Reset the sorting


It should be possible to reset a sorting set by the customer.


With the help of an OXID eShop module the sorting can be reset

For this it is necessary to overwrite the method getSorting in the controllers alist, manufacturerlist and search



public function getSorting($sSortIdent)
    $sortBy = oxRegistry::getConfig()->getRequestParameter($this->getSortOrderByParameterName());
    if ('none' === $sortBy) {
        $aSorting = oxRegistry::getSession()->getVariable('aSorting');
        oxRegistry::getSession()->setVariable('aSorting', $aSorting);

        return null;

    return parent::getSorting($sSortIdent);

Then, in the corresponding template (flow theme: widget/locator/sort.tpl), another link must be added with the parameter listorderby=none, which can be used to reset the sorting.