Ja, das sieht besser aus. Eines fehlt noch:
public function postDispatch(Enlight_Event_EventArgs $args)
{
$subject = $args->getSubject(); // Controller
$view = $subject->View(); // View
$view->assign("kundengruppe",Shopware()->System()->sUSERGROUPDATA['groupkey']);
}
Noch eine Empfehlung:
Enlight_Controller_Action_PostDispatch_Frontend -> Enlight_Controller_Action_PostDispatchSecure_Frontend
Das verhindert, dass dein Code bei Fehlern o.ä. ausgeführt wird.
Viele Grüße