Questions tagged [template]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 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": { "*": { ...
user avatar
0 votes
1 answer
23 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?
user avatar
  • 2,398
0 votes
2 answers
91 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='{{> ...
user avatar
  • 518
0 votes
0 answers
49 views

Add UI Component in the Custom Block

Made the layout file in which I have called the custom block. <?xml version="1.0" encoding="UTF-8"?> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
user avatar
0 votes
1 answer
26 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 ...
user avatar
  • 71
0 votes
1 answer
27 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" ...
user avatar
0 votes
4 answers
44 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/...
user avatar
  • 2,429
0 votes
1 answer
36 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="...
user avatar
0 votes
0 answers
23 views

Error filtering template: Magento 2

I have a rather particular problem. When on a BUNDLE product, I use the "Dynamic SKU" item and try to order the product. I get an e-mail with the following text. Error filtering template: ...
user avatar
0 votes
1 answer
132 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/...
user avatar
  • 1,083
0 votes
1 answer
134 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. */ -->...
user avatar
0 votes
0 answers
88 views

How to save a frontend user uploaded image in desired folder using knockout js

I want to put a file upload button in my gift message extended module(file path is: Vendor/Magento_GiftMessage/web/template/gift-message.html. I could add the button and display the image as well, now ...
user avatar
  • 11
0 votes
0 answers
21 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: ...
user avatar
  • 5,346
0 votes
0 answers
27 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: { ...
user avatar
  • 526
0 votes
4 answers
30 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/...
user avatar
0 votes
1 answer
11 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:...
user avatar
0 votes
1 answer
45 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://...
user avatar
  • 772
0 votes
1 answer
31 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 ...
user avatar
0 votes
1 answer
31 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 "...
user avatar
  • 518
0 votes
0 answers
50 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 ...
user avatar
  • 197
1 vote
4 answers
243 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', ...
user avatar
  • 609
0 votes
0 answers
11 views

Error log showing a template file but module not found in my files

My Magento 2.2.6 Website is become very slow when we are adding product or updating product in backend and some time website is crashing . So when i check the log file i have found following error ...
user avatar
  • 53
0 votes
2 answers
80 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\...
user avatar
0 votes
0 answers
19 views

I want to add swatch images from product page to home page product list

I want to add swatch images from product page to home page product list. swatch images from here to to here, replace the text"THIS is a custom" to swatch images How can I do this.
user avatar
0 votes
1 answer
54 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 /** * ...
user avatar
0 votes
1 answer
467 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 ...
user avatar
1 vote
1 answer
26 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/...
user avatar
  • 148
1 vote
2 answers
613 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 ...
user avatar
  • 498
0 votes
1 answer
159 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, ...
user avatar
  • 2,403
0 votes
1 answer
318 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 ...
user avatar
2 votes
1 answer
215 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 ...
user avatar
0 votes
2 answers
101 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 &...
user avatar
0 votes
3 answers
620 views

Magento 2 - Get name of templates block from .phtml file

Is it possible to get the block name of the current template? For example I added a block to catalog_product_view.xml: <block class="Magento\Contact\Block\ContactForm" name="...
user avatar
  • 2,403
1 vote
4 answers
100 views

Magento 2 : override template file

Is their any way we can override below template file Magento_Sales::email/items/order/default.phtml which is defined in vendor/magento/module-gift-card/view/frontend/layout/...
user avatar
  • 367
0 votes
1 answer
35 views

Email address variable causing items to disappear from email template

I've inserted a variable to bring in the customer email into the default new order template however when I added this I noticed that the items and total amount now disappear - any idea what's going on?...
user avatar
  • 1
3 votes
4 answers
397 views

Magento 2 : Override template file /info/default.phtml

How to override below file in module ? Magento2/vendor/magento/module-payment/view/frontend/templates/info/default.phtml
user avatar
  • 367
0 votes
1 answer
22 views

Magento two cannot update sales_order_create_load_block_items.xml

I need to overwrite Magento_Sales::order/create/items/grid.phtml in sales_order_create_load_block_items.xml created My_Module/view/adminhtml/sales_order_create_load_block_items.xml <?xml ...
user avatar
  • 133
0 votes
1 answer
160 views

Magento 2 : override Magento_Sales::email/items/creditmemo/default.phtml

What is the best way to override below template file in module ? Magento_Sales::email/items/creditmemo/default.phtml
user avatar
  • 367
0 votes
1 answer
74 views

Magento 2: Override Magento_Payment::info/default.phtml

What is the best way to Override Magento_Payment::info/default.phtml in module ?
user avatar
  • 367
0 votes
1 answer
431 views

Magento 2 : Override email/shipment/track.phtml in module

Is their any way we can override email/shipment/track.phtml ? in module ? created layout file view/frontend/layout/sales_email_order_shipment_track.xml <?xml version="1.0"?> <page ...
user avatar
  • 367
0 votes
2 answers
448 views

Can't override list.phtml in Magento 2.4

I try to override the list.phtml in Magento 2.4 but it's not working. Here is the path to my new file : app/design/frontend/Magento/timeote/Magento_Catalog/templates/product/list.phtml All the other ...
user avatar
0 votes
0 answers
32 views

Magento 2 - How to customize "new address" form in checkout?

In magento you can add a new address during the checkout process. I need to add a little text at the position seen in the screenshot: I can't figure out how this is done. I've read through the ...
user avatar
  • 2,403
0 votes
1 answer
92 views

How to add attribute to product grid?

I would like to add the sku attribute to my product widget. Here is the original Magento code- <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ ...
user avatar
  • 843
0 votes
1 answer
33 views

Magento 2 - Conflict in localisation csv file

I understand the general structure of i18n csv files that is like <key_hook>,<translation_of_that_key> but according to the documentation there is the possibility to add a module ...
user avatar
  • 105
0 votes
1 answer
110 views

ViewModel modification makes existing list.phtml break

I recently made a modification to catalog-category-view.xml and overrode category.products.list. It seemed to work at the time, I had badges displaying on a rendered page. Now the template file errors ...
user avatar
0 votes
1 answer
53 views

Sending Email with custom header,footer

I want to create a custom header and footer for email templates. currently when the user receives an email the logo in the head redirects it to the store URL but I want it to redirect to somewhere ...
user avatar
  • 871
0 votes
2 answers
32 views

Where is the template file for the front-end grid view in Magento 2.3?

I need to overwrite the front-end grid view but cannot find the correct file. This is the grid view that appears as a front end option for categories and search - not the admin grid.
user avatar
  • 47
0 votes
1 answer
89 views

Use different phtml for single product

I understand this is probably very simple, but I have thoroughly confused myself and am hoping someone has a few minutes to provide clarity. I would like to apply some very, very custom stuff to a ...
user avatar
0 votes
1 answer
257 views

Is there a way not to loose input form data on php redirect

I have a webpage with a form when I submit that page I go into a controller...he check the data sent $data = $this->getRequest()->getPostValue(); And if one of the data isn't what I am expecting,...
user avatar
  • 772
0 votes
0 answers
30 views

The block is not displaying after loading the page

Please help solve this puzzle. I'm created after plugin, after load category widget. The collection of items must be used in the js. The idea is to simply intercept the collection in the plugin, load ...
user avatar

1
2 3 4 5
28