# Problem mit Block überschreiben in Plugin / Theme

**URL:** <https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972>\
**Category:** Themes & Design\
**Created:** [27. Januar 2016 um 20:41 UTC](https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972 "2016-01-27T20:41:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChriMaLuxe](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@ChriMaLuxe](https://forum.shopware.com/u/ChriMaLuxe)\
**Post date:** [27. Januar 2016 um 20:41 UTC](https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972/1 "2016-01-27T20:41:01Z")

</div>

Hallo,

ich nutze ein eigenes responsive&nbsp;Theme, das von von Bare abgeleitet wurde. Jetzt wollte ich in der&nbsp;frontend/checkout/confirm.tpl den Block&nbsp;{\* confirm Checkout Payment method Block \*}  
{block name=‘frontend\_checkout\_confirm\_left\_payment\_method’} anpassen und habe dazu eine eigene confirm.tpl angelegt mit&nbsp;{extends file=“parent:frontend/checkout/confirm.tpl”} und den Block bearbeitet.&nbsp;Das hat auch geklappt, bis das Heidelpay Plugin installiert wurde. Seitdem ist meine Anpassung weg.&nbsp;

Jetzt habe ich im Plugin mal nach dem Block gesucht und siehe da, der Block ist in der Datei frontend/register/hp\_payment.tpl ebenfalls vorhanden. Und dieser scheint meine Anpassung zu überschreiben.&nbsp;

Wie kann ich denn jetzt meine Anpassungen wieder hinbekommen? Ich habe testweise mal den gesamten Block aus der hp\_payment.tpl in meine confirm.tpl übernommen, nutzt aber nichts.

Wer kann hier weiterhelfen? Danke!

---

<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:** [27. Januar 2016 um 22:37 UTC](https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972/2 "2016-01-27T22:37:39Z")

</div>

in der Theme Datei einfügen:&nbsp; &nbsp;&nbsp;

protected $extend = ‚Bare‘;

&nbsp; &nbsp; protected $name = \<\< MeinTemplate  
SHOPWARE\_EOD;  
&nbsp; &nbsp; protected $injectBeforePlugins = false;

---

<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:** [27. Januar 2016 um 22:38 UTC](https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972/3 "2016-01-27T22:38:34Z")

</div>

Edit: Der HTML Tag gehört da nicht rein.&nbsp;

---

<div class="post-metadata">

**Author:** ![ChriMaLuxe](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@ChriMaLuxe](https://forum.shopware.com/u/ChriMaLuxe)\
**Post date:** [28. Januar 2016 um 09:30 UTC](https://forum.shopware.com/t/problem-mit-block-uberschreiben-in-plugin-theme/33972/4 "2016-01-28T09:30:52Z")

</div>

Funktioniert leider nicht. Ich schreibe mal nochmal genau auf, was ich jetzt habe:

Die original confirm.tpl hat den Block

```
{block name='frontend_checkout_confirm_left_payment_method'}
                        
                            {s name="ConfirmInfoPaymentMethod" namespace="frontend/checkout/confirm_left"}{/s}
                            {$sUserData.additional.payment.description}
                        

                        {if !$sUserData.additional.payment.esdactive && {config name="showEsd"}}
                            {s name="ConfirmInfoInstantDownload" namespace="frontend/checkout/confirm_left"}{/s}
                        {/if}
                    {/block}

```

&nbsp;

Hier will ich die zusätzliche Beschreibung der Zahlweise mit ausgeben, also den Block erweitern um&nbsp;{$sUserData.additional.payment.description}  
{$sUserData.additional.payment.additionaldescription}

Meine eigene confirm.tpl sieht dann so aus:

```
{extends file="parent:frontend/checkout/confirm.tpl"}

{block name='frontend_checkout_confirm_left_payment_method'}
                        
                            {s name="ConfirmInfoPaymentMethod" namespace="frontend/checkout/confirm_left"}{/s}
                            {$sUserData.additional.payment.description}{$sUserData.additional.payment.additionaldescription}
                        

                        {if !$sUserData.additional.payment.esdactive && {config name="showEsd"}}
                            {s name="ConfirmInfoInstantDownload" namespace="frontend/checkout/confirm_left"}{/s}
                        {/if}
                    {/block}

```

&nbsp;

Im Heidelpay Plugin gibt es die Datei&nbsp;hp\_payment.tpl mit folgendem Inhalt für den o.g. Block:

```
{block name='frontend_checkout_confirm_left_payment_method'}
	{$sUserData.additional.payment.description}
	{if !$sUserData.additional.payment.esdactive}
		{s name="ConfirmInfoInstantDownload" namespace="frontend/checkout/confirm_left"}{/s}
	{/if}
	
	{if $swfActive}
		{$smarty.block.parent}
	{else}
		{if !$sRegisterFinished}
			{if !is_int($user.additional.payment.name|strpos:'heidelpay')}				
				{assign var='bar_at' value=$user.additional.payment.name|strpos:'_'}
				{assign var='pm' value=$user.additional.payment.name|substr:($bar_at+1)}
			{/if}
			{if $pm == 'pay'}{assign var='pm' value='va'}{/if}

			{if isset($regData.$pm)}
				
				{s name='hp_selectedPayData' namespace='frontend/register/hp_payment'}{/s}:				
					{if $pm == 'dd'}
						{$regData.$pm.kto}
					{elseif $pm == 'va'}
						{$regData.$pm.email}
					{else}
						{$regData.$pm.cardnr}
					{/if}
				
			{/if}
		{/if}
	{/if}
{/block}

```

Und dieser Block überschreibt wohl meine Block mit der Änderung wieder. Wie bekomme ich das jetzt hin? Nochmals Danke!
