Magento – Category Sorting Product list: How to take off position from attributes

categorysorting

Magento 1.9.0.1

In the admin panel, you have the ability to sort categories by attributes as seen here: http://inchoo.net/magento/changing-default-category-sort-order-in-magento/

Now I have sorted products in categories by:

  • price (default)
  • name
  • position

I need to remove position from the menu leaving only price and name

I don't want to edit every single category view from catalago–>manage categories because I have too many categories in the store.

I need to act in configurations

Best Answer

I've modified the toolbar template file:

/<your_theme>/template/catalog/product/list/toolbar.phtml

replacing this:

<ul>
  <?php foreach($this->getAvailableOrders() as $_key => $_order): ?>
    ...

with this:

<ul>
  <?php foreach($this->getAvailableOrders() as $_key => $_order): ?>
    <?php if ($_key === 'position') { continue; } ?>
    ...