Question

I'm using ultimo theme for a multi store configuration. Since I have to update the theme regularly I don't want to make changes to the base files of it.But I've to make some changes which apply to all stores and severel specific changes within each store. Thats why I'm trying to create one child theme and a grandchild for every store. So I can make modifications for all stores within the child theme and modifications for specific stores within the grandchild themes.

I'm not sure if this is the usual way to do this but it seems to me most obvious and I havn't read that the theme inhgeritence is limited.

I've used the official guide to create the child themes. Unfortunatelly the changes made within allstores does not apply to my frontend which uses a grandchild theme. Maybe I made a misconfiguration, but I can't find it. When I apply the 'allstores' theme to my frontend I see the modifications, so I can assume that the 'allstores' child theme is well configured.

I've cleared the chache, re-indexed and forced to deplay after that.

php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy -f

The theme.xml of the grandchild themes I set as follows:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Store1</title>
      <parent>infortis/allstores</parent>
      <media>
          <preview_image>media/preview.jpg</preview_image>
      </media>
 </theme>

And the composer.json is configured like this:

{
    "name": "infortis/theme-frontend-store1",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0",
        "infortis/theme-frontend-allstores": "^2.0.0"
    },
    "type": "magento2-theme",
    "version": "2.8.0",
    "license": [
        "Proprietary"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

This displays how my theme folder actually look like:

app/design/frontend/
├── infortis/
│   │   ├──base/  <-- core files
│   │   │   ├── ...
│   │   ├──ultimo/  <-- core files
│   │   │   ├── ...
│   │   ├──allstores/ <-- child theme
│   │   │   ├── ...
│   │   ├──store1/ <-- grandchild theme
│   │   │   ├── ...
│   │   ├──store2/ <-- grandchild theme
│   │   │   ├── ...

Do I miss somthing or arn't grandchild themes supported?

Was it helpful?

Solution

Actual problem is in your theme.xml, Parent vendor name should be case sensitive

try the updated xml:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Store1</title>
      <parent>Infortis/allstores</parent>
      <media>
          <preview_image>media/preview.jpg</preview_image>
      </media>
 </theme>

I hope it will helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top