# Plugin SwagCustomSort mit Anfängerfehlern?

**URL:** <https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068>\
**Category:** Plugins\
**Tags:** offizielle-shopware-\
**Created:** [17. Dezember 2015 um 09:06 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068 "2015-12-17T09:06:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [17. Dezember 2015 um 09:06 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/1 "2015-12-17T09:06:11Z")

</div>

Es geht um das Plugin “Individuelle Sortierung SwagCustomSort”. Da es kostenlos ist, will ich auch gar nicht so meckern. Jedoch in der Version 1.0.3 mit SW 5.1. sieht das ganze so aus:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/9/9a5d864682c5d0d12a77924c86e1c08d12fedefa.png) Der Pfad zum Bild ist nicht “…/backend/media/image/thumbnail/…” sondern diese Verzeichnisorgie wie zum Beispiel “…/media/image/51/49/9a/…”. Wie ernst wird das Thema “Testen” genommen?

---

<div class="post-metadata">

**Author:** ![Neox](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Neox](https://forum.shopware.com/u/Neox)\
**Post date:** [17. Dezember 2015 um 09:18 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/2 "2015-12-17T09:18:41Z")

</div>

In der Medienverwaltung werden dir die Bilder allerdings korrekt angezeigt? Wir haben das Problem, dass diese dort auch nicht richtig verlinkt sind. Liegt aber am NGINX-Server. Problem konnten wir dennoch lösen, nachdem wir die zusändige .js geändert haben. Grüße

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [17. Dezember 2015 um 09:32 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/3 "2015-12-17T09:32:48Z")

</div>

[quote]In der Medienverwaltung werden dir die Bilder allerdings korrekt angezeigt?[/quote] Ganz klares YES!

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [17. Dezember 2015 um 16:18 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/4 "2015-12-17T16:18:41Z")

</div>

[quote]Problem konnten wir dennoch lösen, nachdem wir die zusändige .js geändert haben.[/quote] Ja, das hab ich dann auch so gemacht 🙂

---

<div class="post-metadata">

**Author:** ![Webtuftler](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@Webtuftler](https://forum.shopware.com/u/Webtuftler)\
**Post date:** [17. Dezember 2015 um 20:38 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/5 "2015-12-17T20:38:47Z")

</div>

Und zwar wie?

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [18. Dezember 2015 um 08:01 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/6 "2015-12-18T08:01:56Z")

</div>

/SwagCustomSort/Views/backend/custom\_sort/model/article.js Zeile 30 return ‘/media/image/thumbnail/’… Vor “media” ein “/” setzen, sonst stimmt der Pfad nicht 🙂

---

<div class="post-metadata">

**Author:** ![Hotte](https://avatars.discourse-cdn.com/v4/letter/h/90db22/32.png) [@Hotte](https://forum.shopware.com/u/Hotte)\
**Post date:** [29. Februar 2016 um 14:11 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/7 "2016-02-29T14:11:23Z")

</div>

DANKE R4M!

&nbsp;

Ich finde es sehr schade, dass Shopware in Zukunft auf das Plugin verzichetet…

---

<div class="post-metadata">

**Author:** ![andres](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@andres](https://forum.shopware.com/u/andres)\
**Post date:** [5. April 2016 um 09:57 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/8 "2016-04-05T09:57:10Z")

</div>

Danke R4M.

Leider meckert Shopware wegen den legacy URLs…

Lösung „thumbnail“ mit dem Mediaservice setzten im Controller:

Controllers/Backend/CustomSort.php nach Zeile 148 einfügen:

```
            $mediaService = Shopware()->Container()->get('shopware_media.media_service');
            foreach ($result as $key => $value) {
                $mediaPath = 'media/image/thumbnail/'.$value['path'].'_140x140.'.$value['extension'];
                $result[$key]['thumbnail'] = $mediaService->getUrl($mediaPath);
            }

```

und dann in der&nbsp;Views/backend/custom\_sort/model/article.js den Block

```
        {
            name: 'thumbnail',
            type: 'string',
            convert: function (value, record) {
                if (!record.get('path')) {
                    return '{link file="backend/_resources/images/index/no-picture.jpg"}';
                } else {
                    return 'media/image/thumbnail/' + record.get('path') + '_140x140.' + record.get('extension');
                }
            }
        },

```

verkürzen:

```
{ name: 'thumbnail', type: 'string' },

```

&nbsp;

**Leider habe ich im Frontend folgenden Fehler:**

```
debug exception 'Doctrine\DBAL\Query\QueryException' with message 'The given alias 'productCategory' is not part of any FROM or JOIN clause table. The currently registered aliases are: product, variant, tax, productCategory2, avoidCustomerGroup, productAttribute.' in /Users/*/*/*/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryException.php:37

```

Hat jemand ähnliche Probleme?

Habe versucht, alle Plugins zu deaktivieren und einzeln zu reaktivieren.  
Wenn ich eine Einkaufswelt in der Kategorie habe, kommt der Fehler nicht.

---

<div class="post-metadata">

**Author:** ![edin](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@edin](https://forum.shopware.com/u/edin)\
**Post date:** [1. Mai 2016 um 14:01 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/9 "2016-05-01T14:01:24Z")

</div>

> [@R4M schrieb:](https://forum.shopware.com/profile/17170/R4M "R4M")
> 
> /SwagCustomSort/Views/backend/custom\_sort/model/article.js  
> Zeile 30  
> return ‚/media/image/thumbnail/‘…
> 
> Vor „media“ ein „/“ setzen, sonst stimmt der Pfad nicht 🙂

Dies funktioniert nicht, da die Thumbnails in die MD5-Unterordner unterteilt werden (oder gibt es eine Möglichkeit beim Generieren der Thumbnails dies uzugehen?) Man muss zudem die Thumbgröße selbst erstmal manuell anlegen oder ?&nbsp;

---

<div class="post-metadata">

**Author:** ![edin](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@edin](https://forum.shopware.com/u/edin)\
**Post date:** [1. Mai 2016 um 14:04 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/10 "2016-05-01T14:04:16Z")

</div>

> [@R4M schrieb:](https://forum.shopware.com/profile/17170/R4M "R4M")
> 
> /SwagCustomSort/Views/backend/custom\_sort/model/article.js  
> Zeile 30  
> return ‚/media/image/thumbnail/‘…
> 
> Vor „media“ ein „/“ setzen, sonst stimmt der Pfad nicht 🙂

Dies funktioniert nicht, da die Thumbnails in die MD5-Unterordner unterteilt werden (oder gibt es eine Möglichkeit beim Generieren der Thumbnails dies uzugehen?)

Wenn das mit Thumbnails funktioniert, dann muss man so oder so&nbsp;die Thumbgröße selbst erstmal manuell anlegen und die Thumbs neu generieren&nbsp;oder ?&nbsp;

---

<div class="post-metadata">

**Author:** ![rau](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@rau](https://forum.shopware.com/u/rau)\
**Post date:** [5. Mai 2016 um 09:46 UTC](https://forum.shopware.com/t/plugin-swagcustomsort-mit-anfangerfehlern/33068/11 "2016-05-05T09:46:39Z")

</div>

Auch wenn es nicht die direkte Antwort ist: Wir hatten auch zuerst CustomSort im Einsatz, sind nun auf dieses hier gewechselt:&nbsp;[http://store.shopware.com/wbm8351453219168/individuelle-sortierung-in-kategorien-fuer-shopware.html](http://store.shopware.com/wbm8351453219168/individuelle-sortierung-in-kategorien-fuer-shopware.html)
