# \[Plugin\] Smarty ignoriert if/else

**URL:** <https://forum.shopware.com/t/plugin-smarty-ignoriert-if-else/40015>\
**Category:** Programmierung\
**Created:** [22. September 2016 um 08:03 UTC](https://forum.shopware.com/t/plugin-smarty-ignoriert-if-else/40015 "2016-09-22T08:03:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Geloschter\_Benutze7](https://avatars.discourse-cdn.com/v4/letter/_/cdc98d/32.png) [@\_Geloschter\_Benutze7](https://forum.shopware.com/u/_Geloschter_Benutze7)\
**Post date:** [22. September 2016 um 08:03 UTC](https://forum.shopware.com/t/plugin-smarty-ignoriert-if-else/40015/1 "2016-09-22T08:03:08Z")

</div>

Hallo,

Smarty ignoriert im Checkout/cartAction meine gesamten if/else Anweisungen für die entsprechende View, aber die Elemente werden angezeigt.  
Die zugeordneten Variablen werden über eine Hook an die View übergeben:

```
 public static function getSubscribedEvents() { return array( 'Shopware\_Controllers\_Frontend\_Checkout::cartAction::After' =\> 'onCalculateShippingCosts' ); } 

```

Das hier sind die If/else Anweisungen:&nbsp;

```
 {if isset($sDispatch, $sDispatchExpressAvailable, $sDispatchExpressStatus)} {if $sDispatchExpressAvailable eq true and $sDispatchExpressStatus eq false} {content} {else} {if $sDispatchExpressStatus eq true} {content} {/if} {/if} {/if}

```

Weiß jemand woran das liegt?

P.S.: Entschuldigung für die Formulierung, bisschen müde.&nbsp; ![Sticking-out-tongue](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/sticking-out-tongue.png "Sticking-out-tongue")

Mit freundlichen grüßen,&nbsp;  
Brian
