Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Available Product Listing Sort By" will not remove options from drop-down

I want to remove/hide some attribute sort options in my categories.

For this I unchecked "use all attributes" and selected the attributes I want to display in the sort select.

After this I cleared cache and reindexed categories and products data.

But I still have all attributes showing in the sort by select. Can somone help me please?

I'm using a modified toolbar.phtml to hide the "position" sort option, but I think this has nothing to do with the problem:

<div class="sort-by">
    <label><?php echo $this->__('Sort By') ?></label>
    <select onchange="setLocation(this.value)">
    <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
        <?php if ($_order != $this->__('Position')) : // Remove "Position" from the sort option list ?>
            <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
                <?php echo $this->__($_order) ?>
            </option>
        <?php endif; ?>
    <?php endforeach; ?>
    </select>
    <?php if($this->getCurrentDirection() == 'desc'): ?>
        <a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
    <?php else: ?>
        <a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
    <?php endif; ?>
</div>

EDIT:

Here's an image from my display settings inside the category:

display settings

But inside my storeview all options are displayed

like image 302
WolvDev Avatar asked Oct 01 '12 13:10

WolvDev


1 Answers

The problem for me was exactly what the error was saying, it just was hard to understand. You can't pick a default sort option that isn't enabled

enter image description here

like image 179
Steve Robbins Avatar answered Sep 29 '22 21:09

Steve Robbins