Magento产品获取属性需要排序过滤器以降序排列

For this:

Mage::getModel ( 'eav/config' )->getAttribute ( 'catalog_product', 'brand' );

I need sort filter for descending order.

If I get you right, you'll need to do the following steps:

1) Create an attribute

  • In admin-panel go to Catalog > Attributes > Manage Attributes and "Add New Attribute" (or edit the one you already have which you want to be sorted)
  • For "brand" I would suggest "Dropdown" as "Catalog Input Type for Store Owner"
  • Set "Used for Sorting in Product Listing" to "Yes"
  • Create label and options as you desire, e.g. "Brands" as label, "nike", "Diesel" and "adidas" as options.

2) Edit attribute set

Go to Catalog > Attributes > Manage Attribute Sets and add your attribute to the attribute set you are using in your store.

3) Edit Categories

  • Go to Catalog > Manage Categories
  • Select the category in which the products should be sorted by brand.
  • On the right hand side, change to tab "Display Settings". Here you see a list of all available "Sort By" options. (It's a multi-select-field, so you can select different attributes by holding CTRL.)

4) Reindex Data

Go to System > Index Management and re-index your data-tables

Given that "brands" are no numeric value, I don't get what you meant with "descending order". They will be sorted alphabetically.