# Sortierung im Listing

**URL:** <https://forum.shopware.com/t/sortierung-im-listing/25599>\
**Category:** Shopware 3.5\
**Tags:** themes--design\
**Created:** [13. März 2015 um 12:13 UTC](https://forum.shopware.com/t/sortierung-im-listing/25599 "2015-03-13T12:13:27Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![artep](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@artep](https://forum.shopware.com/u/artep)\
**Post date:** [14. April 2016 um 12:17 UTC](https://forum.shopware.com/t/sortierung-im-listing/25599/9 "2016-04-14T12:17:33Z")

</div>

Hi,

es muss nicht immer unbedingt ein Plugin sein, was evtl. dann wieder an anderer Stelle Probleme bereitet. Es geht auch mit einem Artikel-Attribut. So kann man die Artikel nach belieben sortieren.&nbsp;Diese Zeile hier ändern:

/htdocs/engine/Shopware/Bundle/SearchBundleDBAL/SortingHandler/ProductNameSortingHandler.php

ersetze:

$query-\>addOrderBy(‘product.name’, $sorting-\>getDirection())  
-\>addOrderBy(‘product.id’, $sorting-\>getDirection());

durch:

$query-\>addOrderBy(‘productAttribute.attr6’, $sorting-\>getDirection())

&nbsp; &nbsp;-\>addOrderBy(‘product.id’, $sorting-\>getDirection());

---

_[View the full topic](https://forum.shopware.com/t/sortierung-im-listing/25599)._
