0

We have recently noticed that two new sort options have appeared in our Sort By field. The options are "Discontinued Product" and "Product Name". I cannot find where in the code base these options would have been populated. Does anyone have a lead on how or where I can locate the origins of those two Sort By options?

Front end code from Inspector:

<div class="toolbar-sorter sorter">
<label class="sorter-label" for="sorter">Sort By</label>
<select id="sorter" data-role="sorter" class="sorter-options">
                <option value="position">
            Featured            </option>
                <option value="name">
            Product Name            </option>
                <option value="price" selected="selected">
            Price            </option>
                <option value="product_brand">
            Brand            </option>
                <option value="product_discontinued">
            Discontinued Product            </option>
        </select>
        <a title="High to Low" href="#" class="action sorter-action sort-desc" data-role="direction-switcher" data-value="asc">
        <span>High to Low</span>
    </a>
</div>
0

Login to your Magento Admin and go to :

Stores -> Attributes -> Products

find product_discontinued attribute from list and click on that row ( to edit )

Then Go to Storefront Properties tab ( under Attribute Information ) and go to bottom of the page and set "Used for Sorting in Product Listing" to No

Do same with product attribute name

It will remove both from Product List sorting drop down

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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