Questions tagged [theme]

Questions about creating, modifying and configuring Magento themes

403 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
3answers
1k views

$block->getViewModel() returning NULL

I am overriding the layout and adding ViewModel in that layout but when I try to fetch the ViewModel getting below error PHP Fatal error: Uncaught Error: Call to a member function getCodes() on ...
5
votes
0answers
515 views

Magento 2: How to override cacheable=“false” in layout in your own theme

We use a third party extension wich lets us add bundles with specific discounts to product pages. The problem is that they added a default.xml with the following code: <block class="Magedelight\...
5
votes
3answers
305 views

Fatal errors are coming after i run static-content:deploy with third party theme

I am facing some strange issues in Magento 2.1.3, i have configured third party theme and working fine, once i run setup:static-content:deploy, am getting fatal errors like i added below from core ...
4
votes
0answers
1k views

Magento 2 : Disable RequireJS (and all JavaScript)

Is there a way to disable RequireJS completely in Magento 2? I want to build a theme from scratch and I do not want to include any of JavaScript that Magento automatically includes, Including ...
4
votes
1answer
606 views

Magento 2: Include header and footer in external php

I want to include header and footer layout of Magento 2 to external PHP file, I am using my own code(external PHP) to make a frontend page. how to add header and footer layout theme in Magento 2 to my ...
4
votes
1answer
955 views

Customer name is missing in welcome message after login

In header, there is a welcome message which can be configured in the Magento backend. However after login, i found that the customer fullname is not insert into the welcome message,(i.e. always ...
4
votes
3answers
2k views

Magento 2: Can't update product page layout in custom theme

(heavily modified the question for simplicity and clarity) As a test case I created <custom-theme>/Magento_Theme/layout/default_head_blocks.xml. Creating and modifying this file, according to ...
3
votes
1answer
120 views

make sticky header without custom js code

I tried to make the header sticky using the default jquery code: $('.page-header').mage('sticky', { container: '.page-wrapper' }); I added this piece of code into the theme.js file in the ...
3
votes
0answers
170 views

Magento 2: Setting theme ID is not working by using config:set

I found xpath design/theme/theme_id in vendor/magento/framework/View/DesignInterface.php:28. I'm trying to set new ID and there is an error: magento config:set design/theme/theme_id 7 The "design/...
3
votes
1answer
198 views

Magento 2 - How to call a custom HTML file like header.html and footer.html (under Magento Email or Custom Module) in any email templates?

Create separate email header and footer for 2 different "frontend area" for Customer for Vendor Area (seller admin panel "not admin area") I want separate email design for both area. right now my ...
3
votes
2answers
2k views

Magento 2: How to call Widget programatically?

I have created widget Type: CMS Static Block Theme: My Theme Display on: All Pages Container: CMS Footer Links Template: CMS Static Block Default Template Widget Options: Block (My selected block) ...
3
votes
1answer
122 views

Using _extend in a grandchild theme

I have a question regarding how Magento 2 Less handles _extend. According to the documentation http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_approach.html I can ...
3
votes
0answers
678 views

Content > Design > Configuration Blank on new installation

I did a fresh setup of magento2 and upon completion, I couldn't set any configuration options in Content > Design > Configuration. The table rendered with no available results. After trying ...
3
votes
3answers
3k views

Magento 2 - Overwrite module-swatches view.xml

How do you overwrite the view.xml in \vendor\magento\module-swatches\etc\view.xml in your own template? I want to overwrite the sizes for swatch_image and swatch_image_base. I tried putting the ...
3
votes
2answers
3k views

Magento 2 child theme: CSS files not included

I want to add some CSS files. So I created a child theme. In Backend the theme is activated. theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
3
votes
0answers
170 views

Slow Magento Theme

A client of mine is using a commercially available theme on his site (Mango by Smartwave) and it is incredibly slow. I enabled the profiler and Mage is taking between 3.8 and 4.8 seconds to load. Here'...
3
votes
1answer
1k views

CSS not showing for “NEW” or “SALE” label

So I followed this tutorial to add "NEW" or "SALE" label for this site: http://www.ubertheme.com/docs/add-product-labels/. The label does show up on the product icon but for some reason the CSS isn't ...
3
votes
0answers
231 views

Per Store Widget Instance Block References

I have a multi store magento site set up. There is just the 2 Websites and a single store view each. They both use different themes of the same package. Now setting up a block in local.xml of Website ...
2
votes
2answers
58 views

Css can't read content in new area code for theme deploy

Here is my scenario. I have create new area for my theme (Not adminhtml , frontend). Used Developer mode and no symlinks config in admin I have create new module simple for define new area theme ...
2
votes
1answer
63 views

Invalid template file when installing theme

I have installed a theme into my Magento store and now I want to try to switch to that theme. After installing and setting the them in the configuration through the admin panel, I get the following ...
2
votes
3answers
73 views

theme language translation

I have installed a new theme, I created the i18n directory with the csv file. I entered this command to create the dictionary: php magento2/bin/magento i18n:collect-phrases --output="magento2/app/...
2
votes
2answers
121 views

find the ul tag inside header

I need to find the template or layout file that contains this ul tag: <ul class="header links"> <li class="greet welcome" data-bind="scope: 'customer'"> <!-- ko if: ...
2
votes
0answers
47 views

Change theme color from admin dashboard in M2

I want to add an input field that will change the main color of the Luma theme. Could someone help me on what should my custom extension include?
2
votes
0answers
24 views

Finding source of a div “toolbar-top” on inhereted Magento 1.9 Project

I am working on a relatively complicated Ecommerce store on Magento 1.9. I need to add some very simple paragraph text above a toolbar header that floats in the category navigation section of the ...
2
votes
1answer
35 views

Magento custom theme, overwrite block content

I developed a custom theme for Magento 1 for one of my projects. Or tried to follow the guidelines of the communites. I have not overwritten the files {layout}.xml I have created new ones on a module ...
2
votes
1answer
196 views

How to disable frontend for CMS/API-only, headless Magento 2.3

I'm currently working on a web-app that uses Magento 2.3 as a CMS-only. How can I disable the customer-facing frontend and leave only the admin pages accessible? Alternatively, is there a way to set ...
2
votes
0answers
159 views

Magento2 error after theme upload: Invalid template file

After uploading new theme files (Hebes) to Magento 2.3 installation I receive the following error: 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:...
2
votes
1answer
603 views

Magento2: How to get images inserted in custom theme's media folder?

I'm trying to get image which is inserted in /app/design/frontend/Mytheme/themename/media folder using following code but it's shows 404 not found. I have also apply cache clean & static content ...
2
votes
0answers
122 views

Node modules in theme

I am new to magento and i have researched this issue i am having for enough time to post it here. My goal is to understand how require-js works with node modules. Case: $themeDir = app/design/...
2
votes
0answers
59 views

1.9: programatically switch CMS page template in Observer

For a bunch of reasons, I'd like to be able to switch a CMS page's template based on some PHP. In config.xml: <frontend> <events> <...
2
votes
1answer
337 views

How to call custom 503 page without error message in developer mode?

I have create custom error template into pub\errors\custom folder and Customize 503.phtml template file and write custom message into it. In Site Default Mode and Production Mode Template File ...
2
votes
1answer
639 views

Magento 2 - Adding template block to footer

I am creating a theme for a Magento 2 store which extends the Magento blank theme and I would like to add some inline javascript in the footer. The way I would ideally like to do that would be to ...
2
votes
0answers
195 views

Porto theme - Product page

My product page is in 3 colums. How do I put all my swatches in both colum 1 and 2? I think I need to close a DIV in view.html. But when I close DIV in view.html - my 3. colum goes down below all. ...
2
votes
1answer
44 views

2.2 static-content deploy generates extra themes

Since version 2.2, static-content:deploy for a theme will generate themes not specified using the --theme flag. So before in 2.1.x I would generate a theme for 3 languages and get exactly 3 themes. ...
2
votes
0answers
470 views

Custom theme installed via composer require not showing in setup:static-content:deploy or admin panel

I've created my own custom theme and uploaded it to my private package repository. This works fine and downloads my folder into vendor/<vendor>/theme-my-theme I run: php bin/magento setup:...
2
votes
0answers
136 views

Main menu not redirect to url in mobile view

How can I change this in fresh Magento? In mobile view, On click of the arrow, i want to open sub menu list. In mobile view, On click of the main menu tab, I want to open main menu tab URL.
2
votes
2answers
2k views

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

I am getting this error on all of the pages except the HOMEPAGE, i am using a custom theme whose parent theme is LUMA.
2
votes
0answers
22 views

How to add new theme name to grunt CLI command to run grunt tool in Magento 2 with CLI commands instead of editing less.js and themes.js file?

I read this , But I wanna add new theme name to grunt CLI command with some CLI commands not editing a less.js and thmemes.js manually.Is there any solution for this something Like (magento2 add-...
2
votes
1answer
1k views

How to change magento theme in 1.9.3.2 and remove the old theme?

I uploaded Hallow theme for the first time in Magento ver. 1.9.3.2 but unfortunately I had lot of errors like images are not shown in browser etc. Now I want to remove the previous theme and upload ...
2
votes
0answers
211 views

Magento 2: How do I modify the layout of all pages using the 2columns-left layout?

According to the Magento 2.1 frontend developer documentation (http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-types.html#layout-types-page) it should be possible to create a ...
2
votes
1answer
378 views

SyntaxError: Cannot read property 'numerator' of undefined in pub\static\fron \package\theme\en_US\css\source\lib\_responsive.less

SyntaxError: Cannot read property 'numerator' of undefined in pub\static\frontend\package\theme\en_US\css\source\lib_responsive.less on line 44, column 9: 43 @media only screen and (max-width: ...
2
votes
0answers
257 views

Custom Theme Extending Layout Declaring New Logo

So I have configured a new Magento 2 theme following this guide, everything works except my logo is still the default Magento logo. I added a layout in my custom theme directory with an extension (...
2
votes
1answer
545 views

Size attribute not visible for configurable products

I have a magento site with clothing apparels as products. I felt the need to revamp the website and so I am in the process of changing the website's theme. Everything worked perfect until I tested the ...
2
votes
1answer
70 views

Magento Iphone theme jumps to top on reload category page

Out of the box the default iphone theme that comes with Magento jumps back to the top of the category page after a user clicks on a product and after viewing the product hits the back button. It is ...
2
votes
0answers
181 views

Set empty design layout for a controller

I've created a controller that is displaying some html code retrieved from orders.phtml file : <?php class Envato_RecentProducts_OrderController extends Mage_Core_Controller_Front_Action { ...
2
votes
2answers
2k views

Magento 2 and Client Side Less Compilation

I have stock Magento 2 installed and running with a custom theme that uses the 'blank' theme as its parent. My custom theme is active on my store and it works, I can create my own styles and template ...
2
votes
1answer
548 views

Magento 2 - Override an xml file defined in the etc folder in a theme?

I am attempting to override the email templates for the Aheadworks_Giftcard extension. It seems that the email templates are defined in a xml file in the etc directory called sample_email_templates....
2
votes
0answers
112 views

Changes to template files not updating in newly created storeview

I am trying to add a second StoreView that uses its own theme and is accessible by a custom URL. For some reason however, I can not get changes to the template files to display in the frontend. This ...
2
votes
1answer
459 views

Magento 2 (v2.1.2) - Choosing separate theme for product page

I am currently trying to setup an individual custom theme specifically for some products. I have another custom theme which will style/structure the rest of the site along with its own product page ...
2
votes
1answer
918 views

Assign a separate theme to product pages and categories

I have magento 2 and a requirement to show a certain category, subcategories and product pages in those categories using a different layout then other product pages on my store. So just to be clear: ...

1
2 3 4 5
9