Block/Post/PostList/Toolbar.php
public function getCurrentOrder()
    {
        $order = $this->_getData('blog_current_order');
        if ($order) {
            return $order;
        }

        $orders = $this->getAvailableOrders();
        $defaultOrder = $this->getOrderField();

        if (!isset($orders[$defaultOrder])) {
            $keys = array_keys($orders);
            $defaultOrder = $keys[0];
        }

        $order = $this->toolbarModel->getOrder();
        if (!$order || !isset($orders[$order])) {
            $order = $defaultOrder;
        }

        if ($order != $defaultOrder) {
            $this->memorizeParam('sort_order', $order);
        }

        $this->setData('blog_current_order', $order);

        return $order;
    }
public function getCurrentOrder()
    {
        $order = $this->_getData('blog_current_order');
        if ($order) {
            return $order;
        }

        $orders = $this->getAvailableOrders();
        $defaultOrder = $this->getOrderField();

        if (!isset($orders[$defaultOrder])) {
            $keys = array_keys($orders);
            $defaultOrder = $keys[0];
        }

        $order = $this->toolbarModel->getOrder();
        if (!$order || !isset($orders[$order])) {
            $order = $defaultOrder;
        }

        if ($order != $defaultOrder) {
            $this->memorizeParam('sort_order', $order);
        }

        $this->setData('blog_current_order', $order);

        return $order;
    }
public function getCurrentOrder ( ) { $ order = $ this -> _getData ( 'blog_current_order' ) ; if ( $ order ) { return $ order ; } $ orders = $ this -> getAvailableOrders ( ) ; $ defaultOrder = $ this -> getOrderField ( ) ; if ( ! isset ( $ orders [ $ defaultOrder ] ) ) { $ keys = array_keys ( $ orders ) ; $ defaultOrder = $ keys [ 0 ] ; } $ order = $ this -> toolbarModel -> getOrder ( ) ; if ( ! $ order || ! isset ( $ orders [ $ order ] ) ) { $ order = $ defaultOrder ; } if ( $ order != $ defaultOrder ) { $ this -> memorizeParam ( 'sort_order' , $ order ) ; } $ this -> setData ( 'blog_current_order' , $ order ) ; return $ order ; }
Get grit products sort order field.

@return string
Get grit products sort order field .