4

I'm using Magento 2 CE Version 2.1.2.

I have followed Magento StackExchange Questions/Answer for this.

Still having issues.

I would like to Override Magento 2: How to override Adminhtml "Shipping & Handling Information" Information Using Magento Admin Theme.

magento\app\design\adminhtml\Vendor\Themename\registration.php

\Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::THEME, 'adminhtml/Vendor/Themename', __DIR__ ); 

magento\app\design\adminhtml\Vendor\Themename\theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>My Theme Tile</title> <parent>Magento/backend</parent> </theme> 

magento\app\code\Custom\Backend\registration.php

\Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Custom_Backend', __DIR__ ); 

magento\app\code\Custom\Backend\etc\module.xml

<?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Custom_Backend" setup_version="2.0.0"> <sequence> <module name="Magento_Theme"/> </sequence> </module> </config> 

magento\app\code\Custom\Backend\etc\di.xml

<?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Theme\Model\View\Design"> <arguments> <argument name="themes" xsi:type="array"> <item name="adminhtml" xsi:type="string">Magento/backend</item> </argument> </arguments> </type> </config> 

magento\app\design\adminhtml\Vendor\Themename\Magento_Shipping\templates\order\view\info.phtml

echo "hi"; exit; 

I have run below commands as well

php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento cache:flush 

What i'm still missing?

New theme entry shows in theme table

I'm in developer mode.

1 Answer 1

4

You should follow the Magento guide:

There is a note that your magento\app\code\Custom\Backend\etc\di.xml should be:

<type name="Magento\Theme\Model\View\Design"> <arguments> <argument name="themes" xsi:type="array"> <item name="adminhtml" xsi:type="string">Vendor/Themename</item> </argument> </arguments> </type> 
11
  • What i'm missing in above ones? Commented Dec 2, 2016 at 2:55
  • Don't need magento\app\design\adminhtml\Vendor\Themename\Magento_Shipping\etc\module.xml, magento\app\design\adminhtml\Vendor\Themename\Magento_Shipping\etc\di.xml. We need to create a new module to apply the custom theme Commented Dec 2, 2016 at 2:57
  • How & where to check your New Admin Theme is applied? I would like to override that Shipping Block so i need to remove that? Commented Dec 2, 2016 at 3:07
  • magnto/app/code/Custom/Backend/etc/module.xml In <sequence><module name="Vendor_Themename"/></sequence> or <sequence><module name="Magento_Backend"/></sequence> Commented Dec 2, 2016 at 3:09
  • Use <sequence><module name="Magento_Theme"/></sequence>. Commented Dec 2, 2016 at 3:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.