Hey, ich versuche per Plugin den Block zu überschreiben: {block name='frontend\_checkout\_finish\_teaser'}
Dieser befindet sich unter checkout/finish.tpl Leider bekomme ich nun die Ausgabe doppelt. Ein mal normal aus dem Template und ein mal aus meinem Plugin. Warum? Event: $event = $this-\>createEvent( 'Enlight\_Controller\_Action\_PostDispatch\_Frontend\_Checkout', 'onPostDispatchPDFCreator' ); --------------------------------------------------- public static function onPostDispatchPDFCreator(Enlight\_Event\_EventArgs $args) { $request = $args-\>getSubject()-\>Request(); $response = $args-\>getSubject()-\>Response(); $view = $args-\>getSubject()-\>View(); if ($request-\>getActionName()=="finish"){ $config = Shopware()-\>Plugins()-\>Frontend()-\>PDFCreator()-\>Config(); $view-\>PDFCreatorConfig = $config; $view-\>addTemplateDir(dirname(\_\_FILE\_\_).'/templates/'); $view-\>extendsTemplate('frontend/plugins/PDFCreator/finish.tpl'); } }
Template finish.tpl [code] {block name=‚frontend_checkout_finish_teaser‘} {if $PDFCreatorConfig->orderPDF}
{se name=„FinishHeaderThankYou“ namespace=„frontend/checkout/finish“}{/se}{$sShopname}!
{se name=„FinishInfoConfirmationMail“ namespace=„frontend/checkout/finish“}{/se}
{s name=„FinishInfoPrintOrder“ namespace=„frontend/checkout/finish“}{/s}
{s name=„FinishLinkPrint“ namespace=„frontend/checkout/finish“}{/s}
{/if} {/block} [/code]