31 votes
Accepted

How to create a Child Theme in Magento 2

Lets us create a child theme so our all custom themes in Magento 2 goes here: app/design/frontend/company_name/theme_name Let us assume, our company name is mycompany and our theme name is basic. ...
Arunendra's user avatar
  • 7,436
17 votes
Accepted

Magento 2.2.4 Upgrade issue : Area is already set

This is a re-owned issue of Magento 2.2.4 C.E. Magento has been fixed by Daniel Ruf at https://github.com/magento/magento2/commit/7019a0a1392095185505ff3ca7b97dd3e9cb4ef2 at PR #15137 and already ...
Amit Bera's user avatar
  • 77.3k
6 votes

How to create a Child Theme in Magento 2

Create directories: Go to root to the root directory and navigate to app/design/frontend, create directory Demo. Now create Mytheme directory in app/design/frontend/Demo. Create Mangento_Theme ...
Syed Muneeb Ul Hasan's user avatar
5 votes

How to create new theme in magento 2 without parent theme delcartion?

We can create a new theme without depending any parent theme like Magento blank theme vendor/magento/theme-frontend-blank/theme.xml, the difficulty is you need to write all the look and feel changes ...
Bilal Usean's user avatar
  • 9,947
4 votes

How to get order details on Order success page in Magento 2

It already exists in the success block afaik but if not you have to get an instance of this class: \Magento\Checkout\Model\Session You need to inject it into your block class if you wanna use it in ...
nenne's user avatar
  • 654
4 votes

Magento 2.2.4 Upgrade issue : Area is already set

It's thrown by this function in file vendor/magento/module-email/Model/AbstractTemplate.php on line 570. Note I have commented out the error throwing part - which allows me to change the theme with ...
user3858570's user avatar
3 votes
Accepted

Not able to add any additional attribute to Magento 2 Custom Theme's Logo Element

You need to override template of logo.phtml into your custom theme. Follow below steps : Assuming you have already created custom theme and its working fine and activated !! (Location is : app/...
Manthan Dave's user avatar
  • 9,806
3 votes

Correct way to Update a Theme's Parent in Magento 2

UPDATED AT 20160310 Conclusion It is always set either via updateTheme() or from the collection (via DB) if your appState->getMode() == AppState::MODE_PRODUCTION Answer To answer the question ...
Malachy's user avatar
  • 596
3 votes
Accepted

Completely overwrite parent theme layout from the default.xml file of the child theme

I can not explain you how to do exactly what you want because that would involve me setting up a demo website and coding it all for you. But i can give you enough information so you can work with ...
CompactCode's user avatar
  • 2,467
3 votes
Accepted

Which one of the elements automatically render all it's children in layout (m2)

Its container. < container > Containers assign content structure to a page using container tags within a layout XML file. A container has no additional content except the content of included ...
Head's user avatar
  • 157
2 votes
Accepted

How to add custom css file specific to language or store in magento2

Please, see this answer - https://magento.stackexchange.com/a/96080/18419 If you have localized images in specified folder (for example, in the theme), these images will be used instead of default ...
BuskaMuza's user avatar
  • 851
2 votes
Accepted

Is it possible Custom theme for desktop and Luma theme for mobile and ipad

You can achieve this by design configuration from magento 2 admin. Go to STORES > Configuration > General > Design -> User-Agent Exceptions Search String -> Search strings are either normal strings ...
Krishna ijjada's user avatar
2 votes

Magento 2.x some css and js not working in custom theme

When deploying static content, Magento may ignore the assets of custom theme if the assets files(css, js) under web were empty. So, we need to put some css or js files under this folder.
Khoa TruongDinh's user avatar
2 votes
Accepted

Magento 2 theme not loading my css files

Spelling mistake For theme and magento. Should be Magento_Theme, not Magnto_theme
PY Yick's user avatar
  • 2,705
2 votes

Child-Child-Theme Magento 2.1.3

do you have any static files in the child theme? Currently, the whole theme does not get deployed if it does not have any static files. https://github.com/magento/magento2/issues/7569
David Verholen's user avatar
2 votes

Correct way to Update a Theme's Parent in Magento 2

The above didn't seem to work for me, so I went with the hack. Hope it helps someone. using the command line mysql SHOW databases; use magento; (or whatever your DB's name is) SHOW tables ...
wwsiv2's user avatar
  • 41
2 votes
Accepted

Multiple parents of a theme

No, you can't have multiple parents. That would make inheritance very messy. If both parents had the same template, which would take precedence? As Asish said, all you can do is make use of multiple-...
Ryan Hoerr's user avatar
  • 12.2k
2 votes
Accepted

Magento 2 Override image problem (static image of parent theme)

It is solved by changing the environment to development: php bin/magento deploy:mode:set developer
Rafael Calero's user avatar
2 votes
Accepted

Magento 2 add new block template file

app/design/frontend/hexa/Ztheme/Magento_Theme/templates/page/html/sm_template.phtml for Magento_Theme::page/html/mytemplate.phtml and For Sm_FilterProducts::default-grid-column-id16.phtml you ...
Mohamed El Mrabet's user avatar
2 votes
Accepted

Why do I get an exception when trying to append a block to a container in a parent theme?

1- Your theme architecture should be like this: --app/design/frontend/Pulsestorm/dram/ |__ Magento_Catalog/ ...
PЯINCƎ's user avatar
  • 11.6k
2 votes

How to find the file in getchildhtml('customer') in magento 2

$block->getChildHtml('Cusomer_form_register_layyout3') This is nothing but name of block which exist in layout file so you can search in layout(either in your module or design section). $block->...
groy's user avatar
  • 351
2 votes
Accepted

Is it necessary to use a child theme?

in any development you have two options: 1 - using child theme. full separate development to add or rewrite some functions. 2 - using template and css overrides. partial css changes within core ...
MagenX's user avatar
  • 3,810
1 vote

Magento 2 : Add to Wishlist not Appearing on Product Page

I had similar problem in Magento 2.3.0. In my custom theme I changed layout of catalog_product_view.xml and "Add To Wishlist" stopped showing up. Any change to the file and it wouldn't be visible. So ...
Mortimer's user avatar
  • 121
1 vote

Getting Cannot read property 'nodeName' of undefined in magento 2 console

In this case you will definitely accessing any node in html which is not present. so you have to place its presence check before calling it. wrap your code like following if(jQuery('#someID').length){...
Hassan Ali Shahzad's user avatar
1 vote
Accepted

Magento2 - Child Theme CSS location

You can add your css custom code in _theme.less location file app/design/frontend/Vendor/theme/web/css/source/_theme.less Example you extend blank theme Add your css add last in head tag of file ...
mrtuvn's user avatar
  • 3,263
1 vote
Accepted

CDATA in my .xml is creating orphan /> closing tag in <body>

This is because the addItem and addCss methods have different signatures. You would need to look at Mage_Page_Block_Html_Head to see the differences and which parameters are required and which are ...
Brett's user avatar
  • 1,854
1 vote

CDATA in my .xml is creating orphan /> closing tag in <body>

It turns out I was missing a <params/> in my xml, that I guess closes out the head tag. For some reason, I also needed to use the method "addItem" and specify the type as css, rather than ...
hamncheez's user avatar
  • 223
1 vote
Accepted

Inheritance from 3rd party template

Do this to avoid JS error for empty results: <script type="text/javascript"> var ThemeOptions = { box_wide: '<?php echo $_themeHelper->getConfig('general_section/layout/box_wide') ?&...
Jonathan Ribas's user avatar
1 vote

No content is displaying on the main content area

Default Magento 2 with sample data with luma themes, Category landing page and homepage are coming from widgets. You can check widget from Content -> Elements -> Widget There are list of widget ...
Rakesh Jesadiya's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible