i try to build my first extension and the only thing i want to do for now is to replace an existing twig template with my own.
What i had so far is:
event:
Code: Select all
'trigger' => 'catalog/view/product/product/before',
'action' => 'extension/myextension/module/myfirstextension.something',
Code: Select all
public function something(string &$route, array &$data): void {
$data['template'] = 'extension/openwebdev/catalog/view/product/product';
$this->response->setOutput($this->load->view($data['template'], $data));
}

Unfortunately the new file is not output, does anyone have any idea why?
Best,
Jack