I am working with Shopware learning course in Udemy [link], and i got stuck in the end. The stuck is at the last chapter Subscriber methods and global events. Currently im struggling with hide default search by shouting the event and change the default template directory. I follow step by step and still doesn’t know how i can achieve the same efect as the course trainer. Could you guys help me?
I am using:
Shopware 5.5.8
Windows 10 Professional OS
XAMP with 7.2 PHP version.
'onPreDispatchTemplateRegistration'];
}
public function onPreDispatchTemplateRegistration(\Enlight_Event_EventArgs $args)
{
$controller = $args->getSubject();
$templateDir = __DIR__. '/Resources/views';
$controller->View()->addTemplateDir($templateDir);
}
}
And here is my catalog structures:
custom/Plugins/TkStartup – folder with my plugin
and there i have Resources/views/frontend/index/search.tpl
And i have Controller like that:
Routing Demonstration.php which i use to show my custom content of webpage.
The main goal is to hide search form input whenever it is hit to routingDemonstration controller.
Smarty code:
{extends file="parent:frontend/index/search.tpl"}
{* Search field *}
{block name='frontend_index_search_container'}
Nothing to search in here!
{/block}
Hi guys i managed to create working solution. All i had to do was to use vagrant to create my Ubuntu OS instance box where i deployed it. I used official shopware documentation in here:
Oh yeah … Shopware is having some issues with Windows and Linux is also recommended.
Maybe you should also take a look at vscode remote / ssh which was released a few weeks ago. So you can run your dev enviorement on a linux machine / server and connect to the server with vscode or even with a docker container: https://code.visualstudio.com/docs/remote/remote-overview
Is it possible in the near future to get this thing works on windows? I spent 2 days with a headache why my codes doesn’t working on my dev machine before finding this thread…
I had very good impressions with Shopware but seems its getting away…