Quantcast
Viewing all articles
Browse latest Browse all 14594

Custom Products v2 View erweitern

Hallo mal wieder ich,

bin dabei das Shopware Plugin Custom Products v2 zu erweitern.

Leider happerts immer an den eigendlich total simplen Sachen Image may be NSFW.
Clik here to view.
:/

Ich möchte die SwagCustomProducts/Views/frontend/swag_custom_products/detail/default/index.tpl bearbeiten.

Meine Bootstrap MyPlugin.php

/**
 * @return array
 */
public static function getSubscribedEvents()
{
    return [
        'Enlight_Controller_Action_PostDispatchSecure_Frontend_Detail' => ['onDetail', 10]
    ];
}

/**
 * @param \Enlight_Event_EventArgs $args
 */
public function onDetail(\Enlight_Event_EventArgs $args)
{
    /** @var \Shopware_Controllers_Frontend_Detail $subject */
    $subject = $args->getSubject();

    $view = $subject->View();

    $view->addTemplateDir(__DIR__ . '/Views');
}

 Datei angelegt in MyPlugin/Views/frontend/swag_custom_products/detail/default/index.tpl

{extends file="parent:frontend/swag_custom_products/detail/default/index.tpl"}

{* Options container *}
{block name="frontend_detail_swag_custom_products_options"}
    {*test*}
{/block}

Passiert leider nichts...

Hab ich evtl. den falschen Controller angesprochen?!
In Custom Products wird der Detail-Controller Subscribed.
SwagCustomProducts/Subscriber/Frontend.php

Hat das evtl. damit zu tun?

Danke für jeden Ansatz!


Viewing all articles
Browse latest Browse all 14594


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>