Questions tagged [template]
The folder that contains all the `phtml` files used to display at frontend or backend.
1,406
questions
1
vote
2
answers
46
views
Insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in register.phtml
I want to insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in the customer registration form - called in the Magento_Customer::form/register.phtml ...
0
votes
0
answers
12
views
how to update or delete category tree data
The query is the following. I want to update this field in magento, but only accept or replace the new values to be entered with the values that already exist, doing it massively using a template, ...
0
votes
1
answer
30
views
What are the security risks associated with a Magento 2
What are the security risks associated with a Magento 2 website, and how can you mitigate them?
3
votes
1
answer
95
views
Magento 2 community edition
What are the key differences between Magento 2 Community Edition and Magento 2 Enterprise Edition, and which one is the best fit for your business needs?
1
vote
1
answer
39
views
INSTALLATION ENCOUNTER "WHITE SCREEN OF DEATH"
Why do some Magento 2 installations encounter "white screen of death" errors, where the site appears blank with no error messages displayed?strong text
5
votes
1
answer
49
views
causing error and conflicts with modifications
How can I troubleshoot issues with Magento 2 customizations and modifications that are causing errors or conflicts so please s0lve the error
3
votes
2
answers
75
views
How can I enable developer mode in Magento 2? [duplicate]
How to enable developer mode function in magento2 please check the solution for me
0
votes
1
answer
27
views
Block that doesn't explicitly declare template?
I recently followed a tutorial to add a custom fee to the checkout summary of my Magento store and after getting everything working, I realized that the block I created didn't need to have an ...
0
votes
2
answers
61
views
attribute on category page don´t show in second store view
I show a few attributes in my categories(list view) on my default store view and that is working well. Magento ver. 2.4.3
Now I created a second store view but unfortunately the attributes didn´t show ...
0
votes
0
answers
24
views
Magento 2 adding a block on top of add to cart and quantity for configurable products
I am trying to add a custom block on top of the quantity and add-to-cart on the product details page for all products by making changes to catalog_product_view.xml.
I am able to achieve this using ...
0
votes
1
answer
46
views
The way to overwrite list.phtml
A bit new to Magento but need to do next thing:
Hierarchial catalog(HC) [Category > Subcategory('s) > Products]
I found on the web that i can rewrite app/design/frontend/Vendor/theme/...
0
votes
0
answers
16
views
New Order Confirmation Template - move order_totals to bottom of page
I created a new email template for New Order Confirmation Template , which uses the
{{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}
...
0
votes
0
answers
63
views
how to pass javascript variable to php in template
I am creating admin form using template I have multiple select dropdown. I want to filter dropdown based on the value of other but problem is how i can assign the javascript value to php variable so ...
0
votes
2
answers
39
views
Unable to display product name in catalog_product_view.xml
I am new at Magento, I would like to render the product name to catalog_product_view.xml (product page) from a custom phtml but it didn't work. May I know where did I go wrong? Thanks!
app/code/...
0
votes
2
answers
31
views
Custom Page Module with existing theme template?
Is there a way to use a template from a third-party theme, that is already installed, with a newly created custom page module?
0
votes
0
answers
10
views
Custom entity wysiwig doesn't replace variable
Field
<field name="description">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array"&...
1
vote
0
answers
146
views
Getting value of text field in controller?
Magento 2.3
I added a new text field to review.phtml, it looks like that:
<input type="text" id="tel" name="pptel" />
Now in my controller I am trying to get that ...
1
vote
0
answers
33
views
Disallow Comma Validation Rules
I am using this mixin for the custom validation rules in the below template for the first and last name
Template:
/vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
require js :...
0
votes
1
answer
235
views
Pages are scrollable after reaching a footer
Just noticed that Responsive Web Design doesn't work correctly for a desktop version of website. After reaching a footer with page scrolling, pages of website can be scrolled far further (just ...
1
vote
2
answers
24
views
how to pass js window varibles from templates to template files in magento? I want to get system config values in the web folder
I want to pass js window variables from view/frontend/templates/form.phtml to view /web/template/shipping-information.html and view/web/js/shipping-information.js
How can I do it?
it is because I want ...
0
votes
0
answers
90
views
Where / How to add a Buy with Prime button Code Snippet
I am included in the invite-only Buy with Prime. They have provided a code snippet but when I paste it as text in the description, it doesn't render. They suggest I put it in the template. Where would ...
0
votes
1
answer
247
views
Best Way To Set / Override uiComponent Template Via Layout XML or Otherwise?
I'm trying to override the template used by vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details/thumbnail.js:13
return Component.extend({
defaults: {
...
0
votes
1
answer
112
views
Magento 2: performance issue with Magento\Framework\View\TemplateEngine\Php::render
I have enabled the new relic log to check the performance of the Magento 2 website.
On home page I am rendering 5 blocks with 5 template files. In new relic logs, it shows homepage takes time to ...
0
votes
1
answer
318
views
change jsLayout html template
How can i change the jslayout html template to be phtml so i can call other blocks in it?
first i have requirejs-config.js below code
var config = {
"map": {
"*": {
...
0
votes
1
answer
153
views
How to get media path from magento backend
I want to get the media URL from the Magento backend template. Can anyone guide me to sort out this?
0
votes
2
answers
407
views
Double curly brace problem
I created a frontend template page, my page has embedded some javascript. For some lines, I need to use the double curly brace.
one of the line
<a class='media' data-media-index='{{> ...
0
votes
1
answer
86
views
How do I hide "Search engine Optimization" from product add/edit admin panel?
As the question states, im simply trying to hide the "Search Engine Optimization" from the admin panel, how would I do that? Im not sure whether there's somewhere where id be able to place
...
0
votes
1
answer
445
views
Magento 2 layout XML reference block added in CMS page
I have a CMS page, and in certain place it references a custom block from my module as such:
{{block class="My\Notification\Block\NotificationForm" name="notification.form" ...
0
votes
4
answers
220
views
How to overide a html template
I want to override
vendor/magento/module-tax/view/frontend/web/template/checkout/shipping_method/price.html
So I have copied the file to my custom theme to:
app/design/frontend/Company/Theme/...
0
votes
1
answer
68
views
Can't add block below add to cart button
I am new to Magento and would like to add a custom block underneath the 'Add to Cart' button.
Here is my catalog_product_view.xml file:
<?xml version="1.0"?>
<page xmlns:xsi="...
0
votes
1
answer
1k
views
Magento2 : Call phtml file to other phtml file
I want to add new phtml file to existed phtml file. It is working fine, but I want to know reference block and class names.
My code in layout file
<page xmlns:xsi="http://www.w3.org/2001/...
0
votes
1
answer
404
views
Magento 2: Problem overriding product/view/form.phtml in custom module
I tried using this in my catalog_product_view.xml:
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->...
0
votes
0
answers
52
views
Access initialize function's variable in other function
I have a JS file where I am getting .phtml variable dates like:
initialize: function (config)
{
dates = config.dates;
this.test();
}
test: function(){
//get variable dates
}
another: ...
0
votes
0
answers
42
views
How to add color name before product name in mini-cart and right sidebar of checkout page in Magento 2
I want to show the color with the product name in Minicart and Checkout Page in Magento 2.
So i have got the color value by
<!-- ko if: options.length -->
<!-- ko foreach: { ...
0
votes
4
answers
80
views
Override custom extension adminhtml template in my module
I want to over ride following tramplete:
app/code/Mageplaza/EditOrder/view/adminhtml/templates/order/edit/shipping/method/list.phtml
Declared in :
app/code/Mageplaza/EditOrder/view/adminhtml/layout/...
0
votes
1
answer
17
views
Override skip.phtml results on langage switcher disappear
I'm trying to override template skip.phtml file (in the top of Magento) with this layout default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1
answer
200
views
override adminhtml template
I would like to overide the following admin template src/vendor/magento/module-sales/view/adminhtml/templates/order/view/history.phtml
This is what I made
module.xml
<config xmlns:xsi="http://...
0
votes
1
answer
90
views
override html/skip.phtml template's block file
In layout default.xml, i found this
<block class="Magento\Framework\View\Element\Template" name="skip_to_content" template="Magento_Theme::html/skip.phtml">
So ...
0
votes
1
answer
80
views
if condition question in Magento for email template
I need help to verify my if statement, I am not sure in Magento of using "$block->escapeHtml($label)" in if condition is correct or not
does my if statement correct for only showing "...
0
votes
0
answers
82
views
How to overwrite the files in the "template" folder that contains the html files
How to overwrite a file in the "template" folder that contains html files? I'm not talking about the "templates" folder that contains the phtml files. I tried overwriting the same ...
1
vote
4
answers
845
views
How to pass variable to $block->getChildHtml('form_additional_info')
I need to pass the customer object from the edit.phtml template to a child template:
I have this but it does not work:
<?php
$block->getChildBlock('form_additional_info')->setData('customer', ...
0
votes
2
answers
245
views
I want to call phtml file from Magento_Theme to static block. but it is giving some error
PHTML file is located in Magento_Theme/templates/html/breadcrumbs.phtml.
I tried with the code
{{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::html\...
1
vote
1
answer
239
views
Magento 2 Invoice Emails: Tax row alignment in subtotals
So I wanted to change the layout of my invoice emails, especially order totals. I wanted labels to align right.
I copied my totals.phtml file in my theme and added my styling.
<?php
/**
* ...
0
votes
1
answer
901
views
Adding Meta tags to the head of a CMS page Magento 2.3.6
In order to add the following meta tags to the home page I have done the followings:
<meta property="og:image" content="https://example.com/media/wysiwyg/abc.png">
<meta ...
1
vote
1
answer
113
views
Calling the welcome message in different template?
Is it possible to call the default welcome message when user is logged in ("Welcome, customer.fullname") in a different .phtml?
I'd need this message in my Magento_Customer/templates/account/...
1
vote
2
answers
2k
views
How to add Custom Step on Checkout and move Shipping methods in that step In Magento 2.3.5
In this i want one custom checkout step can having only shipping methods inside the step means shipping address and Shipping methods are on different steps on checkout page.
So, Please can anyone have ...
1
vote
1
answer
385
views
Magento 2 - Show validation message in custom container on product update page
I try to show the validation message which shows if you enter a wrong value (for example 0) and try to add the product to the cart, in a custom place. I try to do this on the product update site, ...
0
votes
2
answers
656
views
How can i insert custom tracking url in Order confirmation Email Template?
I want to insert my custom tracking url in Order Confirmation email and url is
https://vitalticks.shiprocket.co
i put code like this
Track you Order here:Vitalticks Order Tracking Page
But it is not ...
3
votes
1
answer
436
views
Magento 2 Custom template content will not shown in graphql response of CMS page
I have a CMS page in which I want to show the date e.i Current date OR Date after 5 days etc. So for that I have created a template file and call inside the CMS page.
It will show content in Front but ...
0
votes
2
answers
698
views
Invalid template file: 'Company_module::menubtn.phtml' in module: '' block's name: 'custom_menu'
I want display a phtml file in the header, i created a phtml file and called in the default.xml but it is giving invalid template file block's name, what should be give as a block name
menubtn.phtml
&...