# Nicht verfügbare Varianten optisch hervorheben

**URL:** <https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053>\
**Category:** Shopware 5\
**Tags:** templates--design\
**Created:** [20. Februar 2022 um 14:54 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053 "2022-02-20T14:54:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Retronia](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@Retronia](https://forum.shopware.com/u/Retronia)\
**Post date:** [20. Februar 2022 um 14:54 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053/1 "2022-02-20T14:54:48Z")

</div>

Hallo,  
wir hätten gerne optisch sichtbar, welche Varianten nicht verfügbar sind.  
So wie im angefügten Screenshot von einem Plugin für virtuelle Varianten:

 ![Screenshot 2022-02-20 152441](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/5/c/5c0029eaf854b006b4fed99e066c35ceaaf53ce8.png)

Gibt es da ein passendes? Bisher wurden wir nicht fündig.

---

<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:** [21. Februar 2022 um 15:15 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053/2 "2022-02-21T15:15:19Z")

</div>

Also mir ist kein Plugin bekannt. Die Umsetzung ist so einfach auch nicht möglich, da bei der Detailansicht leider nicht die Daten der jeweiligen Varianten komplett übermittelt werden. Ja was müsste machen? Vielleicht ein Plugin erstellen, welches die Stückzahlen ggf. mit Abverkauft ermittelt und das mit den dazugehörigen Grafiken verbindet. Vielleicht eine Aufgabe für eine Agentur oder Freelancer.

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [22. Februar 2022 um 09:55 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053/3 "2022-02-22T09:55:15Z")

</div>

Das lässt sich im Theme umsetzten.

Das folgende Beispiel ist ca 6 Jahre alt, aber in die Richtung müsste es gehen.  
Es wird sozusagen eine CSS Klasse „nostock“ eingefügt

```auto
{extends file="parent:frontend/detail/config_upprice.tpl"}

{* Configurator drop down *}
{block name='frontend_detail_group_selection'}
    {*<select name="group[{$sConfigurator.groupID}]"{if $theme.ajaxVariantSwitch} data-ajax-select-variants="true"{else} data-auto-submit="true"{/if}>
        {foreach $sConfigurator.values as $configValue}
            {if !{config name=hideNoInStock} || ({config name=hideNoInStock} && $configValue.selectable)}
                <option{if $configValue.selected} selected="selected"{/if} value="{$configValue.optionID}">
                    {$configValue.optionname}{if $configValue.upprice} {if $configValue.upprice > 0}{/if}{/if}
                </option>
            {/if}
        {/foreach}
    </select>*}
    {assign var="activeFilter" value="nothing"}
    {foreach $sConfigurator.values as $configValue}
        {if !{config name=hideNoInStock} || ({config name=hideNoInStock} && $configValue.selectable)}
            <div data-pill="{$configValue.optionID}" data-group="{$sConfigurator.groupID}" class="MyPillSelect{if $configValue.selected} is-active{/if}{if !$configValue.selectable} nostock{/if}">
                {$configValue.optionname}{if $configValue.upprice} {if $configValue.upprice > 0}{/if}{/if}
            </div>
        {/if}
        {if $configValue.selected}
            {$activeFilter = $configValue.optionID}
        {/if}
    {/foreach}
    <input type="hidden" data-pill-hidden="{$sConfigurator.groupID}" name="group[{$sConfigurator.groupID}]" value="{$activeFilter}">
{/block}

```

---

<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:** [22. Februar 2022 um 10:25 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053/4 "2022-02-22T10:25:59Z")

</div>

> [@brettvormkopp](#):
>
> Das folgende Beispiel ist ca 6 Jahre alt, aber in die Richtung müsste es gehen.

Sicher, dass dies noch so funktioniert? Also ich kenne keine Variable die aktuell bei Details auch die Inhalte aller Varianten übermittelt. Also die Stückzahlen und somit die Verfügbarkeit.

---

<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:** [22. Februar 2022 um 11:02 UTC](https://forum.shopware.com/t/nicht-verfuegbare-varianten-optisch-hervorheben/93053/5 "2022-02-22T11:02:09Z")

</div>

Ah Mensch, „selectable“ übersehen 🙂
