Sometimes it is reasonable to use different hawksearch.css
file or avoid loading it from Hawksearch server. For example, to use minified version of CSS hawksearch.min.css
.
We strongly recommend that you do not change the source code of default Hawksearch and Magento components. All customisations must be implemented in custom modules or themes.
Override hawksearch.css source location
Override view/frontend/templates/hawksearch/proxy/head/js.phtml
file with the custom one in current theme folder. Copy original template and place the copy in the following location:
<theme_dir>/HawkSearch_Proxy/templates/hawksearch/proxy/head/js.phtml
.
Replace this peace of code
$configViewModel->getHawkUrl('includes/hawksearch.css');
with this one
$configViewModel->getHawkUrl('includes/hawksearch.min.css');
Unload hawksearch.css file
In case you want not to load hawksearch.css
file from Hawksearch server please follow these steps:
Place the custom
default.xml
layout file in the following location<theme_dir>/HawkSearch_Proxy/layout
Put the following content in layout file:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="hawksearch.head" remove="true"/> </body> </page>