Solution 1 :

Your directory should be src/Resources/views/storefront/layout not shopfront.

After fixing the directory, reinstall the plugin and clean the cache. by bin/console cache:warmup and bin/console http:cache:warm:up

Solution 2 :

Turned out I had pulled the master install branch and not the latest release.

Problem :

I am trying to override the storefront using my plugin files and doesnt seem to be working. I am using Shopware 6.

I am trying to follow the example they give to set it up, overriding the logo.html.twig in the header.

My file directory is:

Installation root > custom > plugins > MY PLUGIN NAME > src > Resources > views > shopfront > layout > header > logo.html.twig

Inside my logo file I have :

{% sw_extends '@Storefront/storefront/layout/header/logo.html.twig' %}

{% block layout_header_logo_link %}
    <h2>Hello world!</h2>
{% endblock %}

I have ran bin/console cache:clear as well as ./psh.phar cache and bin/console theme:compile.

Thank you.

Comments

Comment posted by jinnoflife

Did you try changing your path to

Comment posted by Kiren S

@jord49 Did you solve the issue?

Comment posted by Jared Chu

In my case, it works after I run

By