View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005464 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2013-10-10 11:08 | 2022-02-01 18:30 |
Reporter | ernestas.poskus | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 4.7.8 / 5.0.8 | ||||
Summary | 0005464: Set initial ordering for categories - sort keys | ||||
Description | /** * Used for setting session variable `aSorting` - (sort_key and sort_direction) * * default: sort key = oxtitle & sort direction = asc * * @param string $sSortKey * @param string $sortDir */ public function setInitialSorting( $sSortKey = 'oxtitle', $sortDir = 'asc' ) { $aCustomSort = array( 'alist' => array( 'sortby' => $sSortKey, 'sortdir' => $sortDir, ) ); if ( !oxRegistry::getSession()->getVariable( 'aSorting' ) ) { /** * Set Session Variables */ oxRegistry::getSession()->setVariable( 'aSorting', $aCustomSort ); } } | ||||
Steps To Reproduce | Controller = alist insert function _setInitialSorting - into __constructor() | ||||
Additional Information | Sets custom session sort key before everything loads | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
waiting for the PO decision. |
|
Actually the default sorting for each category is the one that can be set in the admin (using oxsort keys). It might be useful for various shop owners though to either reset this to a certain key or in general set it to one of the preset keys and directions. |
|
Unfortunately this is a bit difficult as the sortings in the frontend relate to theme settings while the categories have their own settings. So doing this would need a rewrite of the theme |