0

I have created seven child themes and one parent theme for these seven child themes. All seven child themes points to their parent theme, we've named "Master".

<theme>
    <title>Child Theme 1</title>
    <parent>Company/Child1</parent>
</theme>
<theme>
    <title>Child Theme 2</title>
    <parent>Company/Child2</parent>
</theme>
<theme>
    <title>Child Theme 3</title>
    <parent>Company/Child3</parent>
</theme>

...and so on...

The "Master" parent theme points to "Magento/Luma".

<theme>
    <title>Master</title>
    <parent>Magento/luma</parent>
</theme>

Theme locations:

app/design/frontend/Company/Master
app/design/frontend/Company/Child1
app/design/frontend/Company/Child2
app/design/frontend/Company/Child3

Now to the problem

In the Parent theme "Master" layout file: app/design/frontend/Company/Master/Magento_Catalog/layout/theme.xml

I have added:

<referenceBlock name="catalog.compare.link" remove="true" />
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalogsearch.product.addto.compare" remove="true"/>
<referenceBlock name="category.product.addto.compare" remove="true"/>
<referenceBlock name="crosssell.product.addto.compare" remove="true" />
<referenceBlock name="related.product.addto.compare" remove="true" />
<referenceBlock name="upsell.product.addto.compare" remove="true" />
<referenceBlock name="view.addto.compare" remove="true" />

But nothing happens in the seven child themes? Changes does not reflect.

Some questions:

  1. app/design/frontend/Magento is empty, no luma theme, nor blank for the parent theme "Master" - is this correct?
  2. The parent theme "Master" is pointing to "Magento/Luma" - should it be "Magento/Blank" instead?

Greatly appreciated if someone can help me shed some light on this, Thanks,

2
  • Maybe I should just copy /vendor/magento/theme-frontend-luma to app/design/frontend/Company/Luma?
    – Aknot
    Jan 14, 2019 at 15:04
  • Or maybe both the blank and luma theme?
    – Aknot
    Jan 14, 2019 at 15:15

1 Answer 1

0

I think you have to make some change in the child theme "theme.xml".

You are code is

<theme>
    <title>Child Theme 1</title>
    <parent>Company/Child1</parent>
</theme>
<theme>
    <title>Child Theme 2</title>
    <parent>Company/Child2</parent>
</theme>
<theme>
    <title>Child Theme 3</title>
    <parent>Company/Child3</parent>
</theme>

You need to changed into

<theme>
    <title>Child Theme 1</title>
    <parent>Company/Master</parent>
</theme>
<theme>
    <title>Child Theme 2</title>
    <parent>Company/Master</parent>
</theme>
<theme>
    <title>Child Theme 3</title>
    <parent>Company/Master</parent>
</theme>

Hope this will help you. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.