【问题标题】:Magento admin, short by position and nameMagento 管理员,按职位和名称简称
【发布时间】:2018-11-18 05:02:10
【问题描述】:

我想在管理员中按位置排序,当某些产品共享相同时,按名称对它们进行排序。

目录>管理类别>“选择类别”>分类产品>按位置排序

但我找不到有效的方法。有什么想法吗?

【问题讨论】:

    标签: magento-1.8


    【解决方案1】:

    或多或少所有排序的东西都在:

    app/code/core/Mage/Adminhtml/Block/Widget/Grid.php

    我正在寻找的功能(已经修改以适合我的浇注):

    protected function _setCollectionOrder($column)
    {
        $collection = $this->getCollection();
        if ($collection) {
            $columnIndex = $column->getFilterIndex() ?
                $column->getFilterIndex() : $column->getIndex();
            $collection->setOrder($columnIndex, strtoupper($column->getDir()))
    
                ->setOrder('entity_id', 'asc'); // new line
        }
        return $this;
    }
    

    【讨论】:

      猜你喜欢
      • 2011-01-02
      • 2021-02-26
      • 1970-01-01
      • 2012-11-07
      • 1970-01-01
      • 1970-01-01
      • 2012-08-31
      • 2014-02-22
      • 1970-01-01
      相关资源
      最近更新 更多