# Textbaustein in Abhängigkeit von Formularauswahl

**URL:** <https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853>\
**Category:** Shopware 3.5\
**Tags:** administration\
**Created:** [17. Juni 2014 um 16:31 UTC](https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853 "2014-06-17T16:31:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daerwain](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@daerwain](https://forum.shopware.com/u/daerwain)\
**Post date:** [17. Juni 2014 um 16:31 UTC](https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853/1 "2014-06-17T16:31:27Z")

</div>

Hallo Zusammen, ich versuche gerade einen Textbaustein so zu formatieren, dass er sich in Abhängigkeit von der Auswahl der Versandmethode ändert. Ich verwende folgenden Code: `{if sPayment.Name eq "Paypal"}Test{elseif eq sPayment.name "Nachnahme"}test2{else}test3{/if}` Im Frontend wirft er mir dann allerdings einen ellenlangen Fehler aus. Was mache ich falsch? Bin nicht besonders versiert beim Thema php. Viele Grüße, Daerwain

---

<div class="post-metadata">

**Author:** ![SebastianKloepper](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebastiankloepper/32/21435_2.png) [@SebastianKloepper](https://forum.shopware.com/u/SebastianKloepper)\
**Post date:** [17. Juni 2014 um 17:45 UTC](https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853/2 "2014-06-17T17:45:27Z")

</div>

Hi, grundsätzlich fehlt bei den Smarty Variablen das Zeichen $ Also $sPayment.name Sebastian

---

<div class="post-metadata">

**Author:** ![daerwain](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@daerwain](https://forum.shopware.com/u/daerwain)\
**Post date:** [18. Juni 2014 um 00:02 UTC](https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853/3 "2014-06-18T00:02:43Z")

</div>

Hatte ich auch schon probiert. Den Fehler wirft er trotzdem 😕 Also ich versuche auf der Checkout Seite, je nachdem welche Zahlungsart gewählt ist (Paypal, Nachnahme oder irgendwas ganz anderes, den Textbaustein passend dazu anzeigen zu lassen. Hier mal der Fehlercode vielleicht kann jemand damit etwas anfangen… `Syntax Error in template "/home/www/kunden/test.de/engine/Shopware/Plugins/Community/Frontend/KrmeGoogleUniversal/Views/frontend/index/header.tpl" on line 146 "{snippet name="ConfirmInfoInstantDownload" namespace="frontend/checkout/confirm\_left" namespace='frontend/checkout/confirm'} 1 {if $sPayment.Name eq "Paypal"}Test{elseif eq $sPayment.name "Nachnahme"}test2{else}test3{/if}{/snippet}" too many shorthand attributes in Smarty/sysplugins/smarty\_internal\_templatecompilerbase.php on line 657`

---

<div class="post-metadata">

**Author:** ![creatoras](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@creatoras](https://forum.shopware.com/u/creatoras)\
**Post date:** [18. Juni 2014 um 11:07 UTC](https://forum.shopware.com/t/textbaustein-in-abhangigkeit-von-formularauswahl/20853/4 "2014-06-18T11:07:52Z")

</div>

Muss das 2. eq nicht eins weiter rechts stehen?
