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
3answers
17 views

Layout - Pass variables from parent to child

How can I access variables defined in the parent template inside a child template? Example -> I added a new block with name product.info.grouped.news_flag as child of the block with name product.info....
0
votes
0answers
10 views

Magento2 In order email template display tax with 0% tax

In my site I have tax for product as GST (10%) which is displayed in order email template but when there are product with no tax it doesn't display GST (0%). In my email template I want to display GST(...
2
votes
2answers
40 views

Magento 2 pass data from template html to phtml file

So far I have created file MyModule/ProductAlert/view/frontend/email/stock.html - <!--@subject {{trans "Products back in stock alert"}} @--> <!--@vars { "var alertGrid|raw":"Alert Data Grid"...
0
votes
1answer
16 views

<arguments> approach not overriding the template file

I wanted to override vendor/magento/module-sales/view/adminhtml/templates/items/column/name.phtml template. And created new layout xml update as: File: app/code/MagePsycho/CustomInvoice/view/...
0
votes
1answer
11 views

Where body tag styles are defined in Magento 1.9

I have spent several hours trying to figure out this. The fact is that I have a site that has a BODY tag with certain classes for style. I need to change those classes, but I have not find where are ...
1
vote
2answers
51 views

Magento 2 - Override Swatches renderer.phtml

I would like to override file : app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml In my own theme : app/design/frontend/[VendorName]/[theme]/Magento_Swatches/...
0
votes
1answer
15 views

Magento 1.9 template file calling from base and not from my custom theme

In Magento 1.9 I have created my custom theme. Also, I have created one new module in the 'local' code pool. Everything workes fine but the template files are loading from the base like frontend/...
0
votes
1answer
22 views

How to convert template variables to custom data in magento 2

I have configured a back-end screen where I will enter a string as {{price}} for guest user. click here {{sign_up}}. So after I fetch the field value I want to dynamically replace the {{price}} ...
1
vote
1answer
34 views

KnockoutJS Which Model does the Minicart use?

So, i'm very new when it comes to using KnockoutJS but i've been doing some reading around it and to my knowledge each template file has its own corresponding model. However, as i'm looking through ...
0
votes
1answer
16 views

How array set in email.html file

i make custom mail template. my template variables are $TemplateParameter=[ 'customerName'=>$getOrderParams['customerName'], 'orderItems'=>$getOrderParams['productinfo'] ...
0
votes
1answer
25 views

Magento 2 Error filtering template?

After installed module we are getting one error message called "Error filtering template: You cannot define a correlation name 'stock' more than once" Mentioned with below code. Can anyone ...
0
votes
1answer
56 views

How to use different page layouts depends on base layout specified?

I have to use different page layouts (<page>) depends on base layout (<layout>) specified for a product. For example, if I select a layout in product's 'Design' menu with the name ...
1
vote
1answer
77 views

Magento 2 - Override template files in module

What is the correct way to override a template file ? I need to display custom text in place of In Stock and Price on the product page. I want to override the template - Magento_Catalog/view/...
1
vote
2answers
33 views

Adding contents to default customer sign up / create account page - Magento 2

I would like to add a banner image and some contents to default create customer account page at www.domain.com/customer/account/create/, how do i do it? Or Can I add a CMS Page or static block to it?
1
vote
1answer
51 views

Why data bind template is not working on 2.2 or greater?

I was studying about Knockout.js and how it works with Magento 2. Then I reached the topic: template integration, in the first sample of it I'm presented to this notation: <div data-bind="...
1
vote
1answer
17 views

Incorrect behavior when sending email with use a block inside a template

When developing the module I encountered the following problem: inside the my controller (class Index extends \Magento\Framework\App\Action\Action) there is a method that calls a method to send email ...
2
votes
2answers
43 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 ...
3
votes
1answer
48 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 the ...
2
votes
2answers
243 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
28 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
262 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
36 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
131 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
21 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
20 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
15 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
20 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
106 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
61 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
54 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
40 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
378 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
43 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
98 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
135 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
22 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
50 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
28 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
12 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
64 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
87 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
14 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
100 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 ...
2
votes
4answers
128 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
22 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 ...
1
vote
1answer
408 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
38 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
81 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 ...