Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [template]

The folder that contains all the `phtml` files used to display at frontend or backend.

0
votes
1answer
16 views

Best way to change block´s template?

I´ve been studing for the Magento certification and I came across a question in the swiftotter practice exam that said: Can someone explain me why the answer I chose is incorrect? I thought the way ...
2
votes
0answers
29 views

Is it possible to append a block to the footer in admin dashboard?

I'm trying to append a block to the footer but only on the dashboard page i.e. <footer> [New Template] [Core Content] </footer> How can I achieve this? I've tried a layout file with ...
2
votes
2answers
221 views

What is the meaning of triple curly braces {{{ }}} in phtml template files? When and how do we use them?

There is a phtml template file in one of the third party Magento 2 extension which has triple curly braces {{{ }}} in it. When is this notation used, What does it represent?
0
votes
0answers
13 views

How to add template for particular field which is present in admin grid in magento 2

How to add template for particular field which is present in magento 2 Grid.php $this->addColumn( 'expiry_link', [ 'header' => __('test'), 'type' =&...
2
votes
1answer
24 views

Magento does not show template

I can't figure out why magento is not loading my template: The template is located at app/design/frontend/base/default/template/fekete/Newsletter2Go/customer/account/dashboard/info.phtml I double ...
4
votes
2answers
58 views

Invalid template file in Magento 2.3

I have been reading the forum but I can't find any solution to solve my case. I have a custom module where I'm getting the error: 1 exception(s): Exception #0 (Magento\Framework\Exception\...
0
votes
1answer
28 views

Magento2: How to change layout product detail

I want to change size and layout product detail: from: similar to: details.phtml <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ // @...
-1
votes
1answer
37 views

Fatal error: Uncaught Error: Call to a member function getPageLayout() on null in

Magento 2.2.5 version. Every time trying to go to product page I get error: Fatal error: Uncaught Error: Call to a member function getPageLayout() on null in /var/www/html/app/code/MGS/Mpanel/Helper/...
1
vote
1answer
17 views

different template files for product detail page of simple and grouped product types. - Magento 2.2.x

I have 2 types of product in my website. 1) simple products and 2) grouped products i wanted different design for both this types of product types. so how can i have different template file for ...
2
votes
0answers
15 views

How to deal with multiple extensions overriding the same template file?

I have two extensions which load their own template for the block with name customer_form_register in customer_account_create The first extensions overrides the template to add a new field to the ...
1
vote
1answer
13 views

Invalid template file within custom template

I am trying to work out why related products arent being displayed on my frontend, and when I check the logs I am presented with the below. Any help would be great. Thanks [2019-02-14 13:56:02] main....
1
vote
0answers
18 views

subcategories collapse after click in menu

When I click on parent category then sub category opens and when I click on subcategory the respective page open but the menu collapse it does not show on which category and sub-category we are. Can ...
0
votes
1answer
45 views

Magento2 render custom block in adminhtml layout.xml

I can not render my custom block within my custom template, Point is on newsletter subscriber, I extend newsletter_subscriber_form.xml, Add container within my block but it says that template is ...
1
vote
1answer
58 views

Magento 2 Templates: How `$block` is assign in template?

Can you please tell me where the assignment of the $block variable to the template occurs? \Magento\Framework\View\TemplateEngine\Php::render() I found : $tmpBlock = $this->_currentBlock; $...
1
vote
1answer
47 views

How add a country selector in the header section?

I need add a country selector in the header section, next to the currency selector. How is the right way to do this? Edit: I realized that there was not much information in my question, so it was ...
1
vote
1answer
17 views

finding location of $this->getLinks() in template

I have a phtml template that has the following code in it: <?php $links = $this->getLinks(); ?> <ul class="social-links"> <?php foreach ($links as $name => $group): ?> ...
1
vote
3answers
124 views

Magento 2 override minicart.phtml in custom module

I'm trying to override minicart.phtml file from Magento2\vendor\magento\module-checkout\view\frontend\templates\cart\minicart.phtml to my custom module Magento2\vendor\XXXX\YYYY\view\frontend\...
0
votes
0answers
24 views

Install layouts and templates from the theme divante

I installed the theme https://github.com/DivanteLtd/magento2-rapid-theme, the theme got up, everything is in order, I don’t understand how to set the main page to make it as an example. The topic has ...
0
votes
1answer
36 views

Show Separate product detail page based on attribute value in Magento 2

Shall we load separate product detail page based on the product attribute value in magento2 ? I have created the attribute product called "type_of_product" If this attribute value is "Test 2", I ...
1
vote
1answer
39 views

Magento 2 knockout js dynamic button title in minicart

I'm trying to add dynamic checkout button title in minicart using knockout js. Button title will be configured in admin configs. I configured in minicart.js But I dont know how to use/call in template ...
3
votes
2answers
99 views

Magento 1.9xx - Not valid template file

Today I took a look into the system.log from one of our Magento shops and I saw that there is an error: 2019-01-20T09:05:52+00:00 CRIT (2): Not valid template file:frontend/base/default/template/...
0
votes
0answers
17 views

what are all possibility available in magento 2 for all block and template relations?

Recently, I received this question from a reader of my personal blog and it's puzzled me too. He also asked another question: block can be assigned to multiple templates? I think a template can be ...
0
votes
3answers
39 views

Magento2: How to center box with price, product name etc

I try to center box with product details: So, in list.phtml I found code responsible for this box. <div class="product details product-item-details"> <hr /> ...
0
votes
0answers
25 views

Magento2: How to check template name

I want to check template name for this website: https://sportofino.com/ I try to find in source skin but cannot find. Anyone help?
0
votes
0answers
10 views

JS Error breaks Minicart in developer mode only Invalid template file

I'm working on a project and I'm getting the below browser console error only in developer mode when I add an item to the cart Invalid template file: 'cart/item/price/sidebar.phtml' in module: '...
0
votes
1answer
56 views

override wysiwyg_images.files

I try to override Magento_Cms::browser/content/files.phtml but when i test , the block is dont display , and i dont know why i have the next extructure <Vendor>_<Module> ├── <Stuff&...
0
votes
0answers
50 views

How to fetch product data into custom .phtml block on product view

I'm having trouble trying to fetch Product data such as price, SKU etc into a custom .phtml file referenced as a block within my catalog_product_view.xml file. Here's what I'm struggling with... I'm ...
0
votes
0answers
11 views

How to call a template after minicart is loaded in magento 2

How to call a template after minicart is loaded in magento 2 I wish to call the template for all the pages after the quote is created. So please provide me a solution to cal a template after the quote ...
2
votes
0answers
43 views

How to override Magento 2 welcome email upon new customer account creation

I need to customize default Magento welcome email template which is sending upon new customer account creation in my custom module. I'm using the following functions for sending welcome email upon ...
1
vote
3answers
52 views

Can I and should I call Block methods from its' View Model?

I have a template and should write some logic. I have made a view model and I'm calling it from a template. Should I call block methods from the view model? And if so, how can I do it?
0
votes
1answer
20 views

in custom homepage template images added only in newline (magento 1.9.4)

Following is the homepage.phtml <html> <?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this ...
0
votes
1answer
177 views

Magento 2.2.6 - Change the product name title

how I can change products name attribute. I create a new attribute second_name and I assigned to all products, now I want this attribute to replace the default name attribute. I need to change this on ...
1
vote
0answers
33 views

M2 Confirmation Mail: prefix won't translate

Customers are saved in the DB with prefix "Mr." or "Mrs.". Registration Confirmation Email Template looks like this {{template config_path="design/email/header_template"}} <p class="greeting">...
1
vote
2answers
62 views

Template doesn't load on custom theme

I have a problem with loading a new template on payment methods section on checkout, but only on my custom theme. I have created a custom module that adds a new block with template in the above ...
1
vote
1answer
24 views

Can I add the search box to a template without xml?

Can I add the search box to a template without xml? I need to create a dropdown with the search box when I click on a magnifying glass icon.
0
votes
1answer
78 views

Magento2: How to move header-bottom to top

I am trying to move the header to the top of the page. I'm use in default.xml <move element="header-bottom" destination="header-top" as="new_alias" before="header-middle"/> But without a ...
0
votes
3answers
40 views

How to edit template header

I want to change header in template. Hide cart , Login, wishlist etc. from: https://zabezcen.pl/ to: http://zabezcen.pl/strona.png Anyone help me how can I do ? @Update Thank you Guys, I ...
0
votes
0answers
36 views

Product Attribute swatch image in template

I have a product Attribute that can be set as a swatch with an image. How can I get the swatch image src in my template ? I can use the following to get the label. $attribute_value = $_product->...
0
votes
1answer
38 views

How can I get a list of all of the product Attributes?

I have some code to get the product in my block template: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_product = $objectManager->get('Magento\Framework\Registry')->...
0
votes
1answer
40 views

How to override a phtml from extension?

I am using Mega Menu free extension from Ibnab. I want to override menu file to add custom li. app/code/Ibnab/MegaMenu/view/frontend/templates/html/top-mega.phtml Is there any way to override this ...
0
votes
1answer
41 views

From a plugin how can I override a different plugin template file.?

I'm really new to Magento. How can I override a modules templates files from another module ? I have this file: /app/code/Amasty/Shopby/view/frontend/templates/layer/filter/swatch/default.phtml ...
5
votes
2answers
211 views

How to debug in ko template in magento 2?

Here is the code in \vendor\magento\module-checkout\view\frontend\web\template\shipping-address\custom-method-item-template.html <tbody collapsible="as: '$collapsible_' + method.method_code"> &...
0
votes
0answers
30 views

Adding link below custom image on Product page

Not a developer so please bear with me, On one of my stores I have a manufacturer section that uses a separate plugin for magento 1.9.2.4. It has the option to add the manufacturer logo on the ...
0
votes
1answer
31 views

Output Base URL in root.phtml

my root.phtml looks like this: <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ // @codingStandardsIgnoreFile ?> <!doctype html> &...
0
votes
1answer
46 views

How to render HTML in x-magento-template?

I have used this blog https://webkul.com/blog/how-to-write-javascript-template-in-magento2/ to use x-magento-template. In this I can render data using such code: <%- data.name %> But it shows ...
1
vote
2answers
191 views

how to trigger click event in M2

In my header section I have user name and if user have access to different location then he has button saying click me. I want to send ajax call on this button. But JS is not working. Can anybody help ...
0
votes
1answer
39 views

Magento2: Template how to edit header

I want little change header in template. 1) I need to shorten a little search engine 2) Move logo to banner search engine 3) Search engine move to up and stick always on top. Can anyone help me ...
0
votes
0answers
14 views

M2 js getUrl links randomly absolute or relative

I am not used to frontend development... We have a link like this: <a class="primary button" data-bind="attr: { href: getUrl('my-special-page') } href="my-special-page"> <span data-bind="...
0
votes
2answers
54 views

How do I override plugin phtml file added by XML?

I have the MageFan Awesome Blog plugin for my Magento 2 instance. I've managed to override the recent posts template by adding my own BlogOverride plugin to my vendor. Now I am trying to override the ...
0
votes
2answers
44 views

Magento 1 - setTemplate in block class constructor does not work

I try to overwrite the template app\design\frontend\venedor\custom\template\catalog\product\view\options\type\select.phtml with app\design\frontend\base\default\template\wr\catalog\product\view\...