rappasrappas MemberComments: 1 Received thanks: 0 Member since: August 2020

Hello,

I have a clean installation of shopware 6 (mac with docker sync).
Create a theme plugin. Everything works with for example javascript. But overwriting a twig file does not work:

- I've setted the cache: false in the twig yaml
- I use the following path like the example: touch src/Resources/views/storefront/layout/header/logo.html.twig

Can somebody set me in the right direction? I cannot create themes / plugins without this working.

Answers

  • Timmy_ClarkTimmy_Clark MemberComments: 10 Received thanks: 5 Member since: March 2020

    Hi Rappas,

     

    you can find information on how to create theme's for shopware 6, here

    Information about working with Twig can be found here
    Also remember that Twig doesn't allow multi inheritance out of the box. Therefore we created our own twig functions sw_extends and sw_include.

    Best regards,

    Timmy

  • gregamergregamer MemberComments: 1 Received thanks: 0 Member since: February 2

    I'm having the same issue. However the installation on my server works like a charm. I have two options there:

    1. enable dev anvironment in .env and any changes to twig files are visible on refresh,
    2. or leave environment to production, cache on, but in this case I need to to go Settings -> system -> cache and clear cache

    In both cases I can see the change in the twig file. Now, working on an installation on my client's server I can't get the changes to appear. The scss changes are visible, but twig is just dead. I don't have access to anything else than custom theme folder so I can't make any conf changes.

    Does anyone have any idea what that could be and how to fix?

    Thanks,
    Grega

  • dubinamdubinam MemberComments: 1 Received thanks: 0 Member since: February 4

    Hi Rappas,

     

    you can find information on how to create theme's for shopware 6, here

    Information about working with Twig can be found here
    Also remember that Twig doesn't allow multi inheritance out of the box. Therefore we created our own twig functions sw_extends and sw_include.

    Best regards,

    Timmy

    Hey Timmy, I have the same issue with twig binding. Did the same said in link you put upper. I used clear DockWare image, Mac OS. Version  6.3.5.0. 

    Changes in plugin config works well as a changes in styles. I also try make changes inside vendor views and they appear. But plugin views don’t want( 

  • rappasrappas MemberComments: 1 Received thanks: 0 Member since: August 2020

    The problem I had was docker-sync. But when installed correctly or using dockware these problems solved for my scenario on a Mac.

Sign In or Register to comment.