5

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

2 Answers 2

10

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

0

Okay, fixed the problem:

I changed the settings in all store views, but it didn't changed in all sotre views. When I tried to change the setting Use Default Value in my "languagesviews". I get the error "Default Product Listing Sort by not exists on Available Product Listing Sort By".

So I "just" need to change all categorysettings of each language.

EDIT:

After editing some categories and checking/unchecking "use default values" the error is gone and I set all "use default values" to yes.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.