このパッチを機能させるには、いくつかの変更が必要です。ただし、コードは、別のクラスのモデル リライトに配置することをお勧めします。
私にとってうまくいった解決策Mage_Eav_Model_Entity_Attribute_Source_Table::addValueSortToCollection
は、関数の最後に次のコードをオーバーライドして追加することでした。
$attribute = $this->getAttribute();
$order = $attribute->getAttributeCode();
$dir = strtoupper($dir);
$collection->getSelect()->reset(Zend_Db_Select::ORDER);
$collection->getSelect()
->joinLeft('eav_attribute_option AS eao', "eao.option_id=IF({$order}_t2.value_id > 0, {$order}_t2.value, {$order}_t1.value)", array("sort_order" => 'eao.option_id'))
->order(new Zend_Db_Expr('eao.sort_order '.$dir));
これは、すべてのカタログ コレクションおよびソース モデル クラスがeav/entity_attribute_source_table