Shopware custom theme

Viewed 55

I want to make a custom shopware theme, created one by using the documentation. Emptied out my theme.json. Expectation is theme without anything, no markup, no content nothing. I come from WooCommerce, so an empty theme means an empty frontend.

When i visit the frontend of my shopware theme i see this:

enter image description here

Why is there any content? I haven't done any templating yet.

Also, if i view my theme settings:

enter image description here

Why is my theme derived from 'Shopware default theme' ??? And why are there theme settings present? My theme is empty.

As i come from WooCommerce, this is really confusing, even after reading the docs.

I'd love someone to clarify this.

My theme.json:

{
    "name": "Rowan",
    "author": "RvZ",
    "views": [],
    "style": [],
    "script": [],
    "asset": []
}
1 Answers

If you seriously want a completely blank slate, then you could empty the views property in your theme.json except for your own theme alias.

{
  "name": "Rowan",
  "author": "...",
  "views": [
     "@Rowan"
  ],
  "style": [
  ],
  "script": [
  ],
  "asset": [
  ],
  "configInheritance": [
  ]
}

Then based from your theme's root directory create an empty src/Resources/views/storefront/base.html.twig.

You might then have to clear the cache so the changes take effect.

This will leave you with basically nothing. Keep in mind you will have to implement many templates of the default storefront templates yourself at that point, from ground up no less. You'd need to recreate the original directory structure as well as the controllers will require to render different templates in specific directories.

As for the theme configuration there are just some basic fields that will always be shown within the administration. I don't know of a way to remove these even if your theme inherits nothing from the default storefront.

Related