# Zusätzliche Tabs

**URL:** <https://forum.shopware.com/t/zusatzliche-tabs/55369>\
**Category:** Programmierung\
**Created:** [24. September 2018 um 10:13 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369 "2018-09-24T10:13:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [24. September 2018 um 10:13 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/1 "2018-09-24T10:13:19Z")

</div>

Hi,

vielleicht hat ja jemand eine Idee.

Ich habe das hier in der tabs.tpl angelegt:

{extends file=“parent:frontend/detail/tabs.tpl”}

{\* New tab \*}  
{block name=“frontend\_detail\_tabs\_description” append}  
&nbsp; &nbsp; {if $sArticle.attr10}  
&nbsp; &nbsp; {s name=‘NewTabs360Ansicht’}{/s}  
&nbsp; &nbsp; {/if} &nbsp; &nbsp;  
&nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp; {if $sArticle.attr11}  
&nbsp; &nbsp; {s name=‘NewTabsKuenstlerbiografie’}{/s}  
&nbsp; &nbsp; {/if} &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; {if $sArticle.attr12}  
&nbsp; &nbsp; {s name=‘NewTabsBronzeguss’}{/s}  
&nbsp; &nbsp; {/if}  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;{if $sArticle.attr13}  
&nbsp; &nbsp; {s name=‘NewTabsInfos’}{/s}  
&nbsp; &nbsp; {/if}  
&nbsp;&nbsp;  
&nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp;&nbsp;  
{/block}

{\* New Tab container \*}  
{block name=“frontend\_detail\_tabs\_content\_description” append}  
&nbsp; &nbsp; {if $sArticle.attr10}  
&nbsp; &nbsp;

&nbsp; &nbsp;  
{s name=‘NewTabs360Ansicht’}{/s}

&nbsp; &nbsp;  
{$sArticle.attr10|strip\_tags|truncate:100: ‘…’}{s name=“PreviewTextMore”}{/s}

&nbsp; &nbsp;  
{include file=“frontend/detail/tabs/360ansicht.tpl”}

&nbsp; &nbsp;

&nbsp; &nbsp; {/if}  
&nbsp; &nbsp;&nbsp;  
&nbsp;&nbsp; &nbsp;{if $sArticle.attr11}  
&nbsp; &nbsp;

&nbsp; &nbsp;  
{s name=‘NewTabsKuenstlerbiografie’}{/s}

&nbsp; &nbsp;  
{$sArticle.attr11|strip\_tags|truncate:100: ‘…’}{s name=“PreviewTextMore”}{/s}

&nbsp; &nbsp;  
{include file=“frontend/detail/tabs/kuenstlerbiografie.tpl”}

&nbsp; &nbsp;

&nbsp; &nbsp; {/if}&nbsp;  
&nbsp;&nbsp; &nbsp;  
&nbsp; &nbsp; {if $sArticle.attr12}  
&nbsp; &nbsp;

&nbsp; &nbsp;  
{s name=‘NewTabsBronzeguss’}{/s}

&nbsp; &nbsp;  
{$sArticle.attr12|strip\_tags|truncate:100: ‘…’}{s name=“PreviewTextMore”}{/s}

&nbsp; &nbsp;  
{include file=“frontend/detail/tabs/bronzeguss.tpl”}

&nbsp; &nbsp;

&nbsp; &nbsp; {/if}&nbsp;  
&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;{if $sArticle.attr13}  
&nbsp; &nbsp;

&nbsp; &nbsp;  
{s name=‘NewTabsInfos’}{/s}

&nbsp; &nbsp;  
{$sArticle.attr13|strip\_tags|truncate:100: ‘…’}{s name=“PreviewTextMore”}{/s}

&nbsp; &nbsp;  
{include file=“frontend/detail/tabs/infos.tpl”}

&nbsp; &nbsp;

&nbsp; &nbsp; {/if} &nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  
{/block}

* * *

Dann noch im tabs Ordner die entsprechenden Dateien wie zum Beispiel kuenstlerbiografie.tpl mit folgendem Inhalt:

&nbsp;   
&nbsp; &nbsp;  
&nbsp; &nbsp; ZurÃ¼ck  
&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; {$sArticle.attr11}  
&nbsp;

-\>\>\> Soweit funktioniert das auch, klicke ich jetzt jedoch auf eine Variantenauswahl, dann sind die Tabs plötzlich nicht mehr anwählbar.

Zu sehen hier:&nbsp;[https://www.hug-galerie.com/skulpturen/505/ikarus-der-absprung-limitierte-bronze-skulptur-von-e.-waehning](https://www.hug-galerie.com/skulpturen/505/ikarus-der-absprung-limitierte-bronze-skulptur-von-e.-waehning).

Vielen Dank

&nbsp;

---

<div class="post-metadata">

**Author:** ![BestShopPossible](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@BestShopPossible](https://forum.shopware.com/u/BestShopPossible)\
**Post date:** [24. September 2018 um 11:12 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/2 "2018-09-24T11:12:55Z")

</div>

Der Foren-Editor hat ein Element zum einfügen von Code.

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [24. September 2018 um 11:17 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/3 "2018-09-24T11:17:45Z")

</div>

Hi,

vielleicht hat ja jemand eine Idee.

Ich habe das hier in der tabs.tpl angelegt:

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

{* New tab *}
{block name="frontend_detail_tabs_description" append}
    {if $sArticle.attr10}
    {s name='NewTabs360Ansicht'}{/s}
    {/if}    
    
    {if $sArticle.attr11}
    {s name='NewTabsKuenstlerbiografie'}{/s}
    {/if}      

    {if $sArticle.attr12}
    {s name='NewTabsBronzeguss'}{/s}
    {/if}
    
    {if $sArticle.attr13}
    {s name='NewTabsInfos'}{/s}
    {/if}
  
    
    
    
{/block}

{* New Tab container *}
{block name="frontend_detail_tabs_content_description" append}
    {if $sArticle.attr10}
   

   
{s name='NewTabs360Ansicht'}{/s}

   
{$sArticle.attr10|strip_tags|truncate:100: '...'}{s name="PreviewTextMore"}{/s}

   
{include file="frontend/detail/tabs/360ansicht.tpl"}

   

    {/if}
    
    {if $sArticle.attr11}
   

   
{s name='NewTabsKuenstlerbiografie'}{/s}

   
{$sArticle.attr11|strip_tags|truncate:100: '...'}{s name="PreviewTextMore"}{/s}

   
{include file="frontend/detail/tabs/kuenstlerbiografie.tpl"}

   

    {/if} 
    
    {if $sArticle.attr12}
   

   
{s name='NewTabsBronzeguss'}{/s}

   
{$sArticle.attr12|strip_tags|truncate:100: '...'}{s name="PreviewTextMore"}{/s}

   
{include file="frontend/detail/tabs/bronzeguss.tpl"}

   

    {/if} 
    
    {if $sArticle.attr13}
   

   
{s name='NewTabsInfos'}{/s}

   
{$sArticle.attr13|strip_tags|truncate:100: '...'}{s name="PreviewTextMore"}{/s}

   
{include file="frontend/detail/tabs/infos.tpl"}

   

    {/if}  
             
{/block}

```

Dann noch im tabs Ordner die entsprechenden Dateien wie zum Beispiel kuenstlerbiografie.tpl mit folgendem Inhalt:

```
    ZurÃ¼ck
  

  
  
    {$sArticle.attr11}

```

-\>\>\> Soweit funktioniert das auch, klicke ich jetzt jedoch auf eine Variantenauswahl, dann sind die Tabs plötzlich nicht mehr anwählbar.

Zu sehen hier:&nbsp;[https://www.hug-galerie.com/skulpturen/505/ikarus-der-absprung-limitierte-bronze-skulptur-von-e.-waehning](https://www.hug-galerie.com/skulpturen/505/ikarus-der-absprung-limitierte-bronze-skulptur-von-e.-waehning).

Vielen Dank

---

<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:** [24. September 2018 um 11:31 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/4 "2018-09-24T11:31:19Z")

</div>

Ich sehe da ein JS-Fehler, der vermutlich weitere Funktion (wie eben den Tab) verhindert:

```
TypeError: quads is undefined 1 box-model.js:410:9

```

Vermutlich kommt der Fehler auch vom Browser selber, scheint aber mit JS in Verbindung zu stehen.

---

<div class="post-metadata">

**Author:** ![Murmeltier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/murmeltier/32/16126_2.png) [@Murmeltier](https://forum.shopware.com/u/Murmeltier)\
**Post date:** [24. September 2018 um 11:32 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/5 "2018-09-24T11:32:15Z")

</div>

Die Tabs werden leider von Shopware nicht beim Variantenwechsel über Ajax nachgeladen!

Check mal noch: Theme Manager \> aktives Theme konfigurieren \> Konfiguration \> „Variantenwechsel über AJAX“:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/5/5e1375ba137a6ab3411beb9ecacc85e5d0635ca3.png)

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [24. September 2018 um 11:36 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/6 "2018-09-24T11:36:09Z")

</div>

Hi,

ok wie kann ich das ändern? 🙂

---

<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:** [24. September 2018 um 12:00 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/7 "2018-09-24T12:00:41Z")

</div>

In einem originalen Shop funktionieren auch die Tabs bei Variantenwechsel mit Ajax. Jedoch hier haben die Tab-Container nach dem Variantenwechsel alle den selben Inhalt. Beim Klick wechseln die Tabs, aber der Inhalt ist nun überall der selbe. Was hier alles am Theme umgebaut wurde, ist jetzt auch nicht ganz nachvollziehbar. Aber irgendwo wurde etwas nicht korrekt angelegt.

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [24. September 2018 um 12:09 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/8 "2018-09-24T12:09:10Z")

</div>

@murmeltier,

ich habe jetzt mal den Haken Varianten über Ajax laden rausgenommen, dann funktioniert es.

Vielen Dank

---

<div class="post-metadata">

**Author:** ![Murmeltier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/murmeltier/32/16126_2.png) [@Murmeltier](https://forum.shopware.com/u/Murmeltier)\
**Post date:** [24. September 2018 um 13:20 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/9 "2018-09-24T13:20:05Z")

</div>

Klar, weil die Seite neu geladen wird. Normalerweise werden die Tabs wohl via AJAX nachgeladen.

---

<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:** [24. September 2018 um 13:43 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/10 "2018-09-24T13:43:25Z")

</div>

Nein, hier stimmt etwas nicht. Die Inhalte der Tabs werden nicht mit Ajax geladen - zumindest nicht in den aktuellen Versionen. Hier muss etwas anderes die korrekte Anzeige blockieren bzw. blockiert haben. Womöglich hängt es auch mit dem Wechsel von GET/POST (durch die Umstellung beim Variantenwechsel) zusammen.

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [24. September 2018 um 14:09 UTC](https://forum.shopware.com/t/zusatzliche-tabs/55369/11 "2018-09-24T14:09:47Z")

</div>

Das mit dem gleichen Inhalt liegt an der Klasse. Nimm da mal was eigenes, keine die es schon gibt.

&nbsp;
