0
public function install() {
$this->subscribeEvent(
'Enlight_Controller_Action_PostDispatchSecure_Frontend',
'onFrontendPostDispatch',
0
);
return array('success' => true, 'invalidateCache' => array('frontend'));
}
public function onFrontendPostDispatch(\Enlight_Event_EventArgs $args)
{
/** @var \Enlight_Controller_Action $controller */
$controller = $args->get('subject');
$view = $controller->View();
$view->addTemplateDir(
__DIR__ . '/Views'
);
}
我曾尝试运行插件并覆盖模板,但Shopware未在插件中看到更改。从插件中覆盖Shopware 4中的模板
我在plugins root中创建/Views/frontend/checkout/cart_footer.tpl
中的新文件。
我也插入.tpl文件
{extends file='parent:frontend/checkout/cart_footer.tpl'}
线,但仍然没有成功。
是否有人知道问题在哪里?