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
0answers
10 views

Magento 2 send data from html template to Controller without Ajax

So I have created a component which has 2 templates, but the property data is the same for both. I wanted to know if there is a way to send data without using ajax. Why? Because I don't need to use ...
2
votes
0answers
25 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
2answers
19 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 &...
0
votes
3answers
25 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="...
1
vote
4answers
62 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/...
0
votes
1answer
24 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?...
2
votes
4answers
61 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
0
votes
1answer
11 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 ...
0
votes
1answer
24 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
0
votes
1answer
26 views

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

What is the best way to Override Magento_Payment::info/default.phtml in module ?
0
votes
1answer
97 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 ...
0
votes
0answers
16 views

Shipment email template amendment

I am trying to amend our shipment email template so it will show a list of items NOT YET DISPATCHED (if applicable) - call it a backorder list if you like. Does anybody know how I can do this? Thanks ...
0
votes
2answers
40 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 ...
0
votes
0answers
7 views

Making A costume PDF invoice

I am new to magento 2 and want to customize my invoice PDF that is created, I want to change the design completely and want to add new field also I want to make a conditional paragraph that shows in ...
0
votes
0answers
12 views

Sort By option not working properly when using ascending or descending button

So the problem is as follows: I have the Sort By option set to "Price", but once i try to change the order from descending to ascending or vice versa, the Sort By" turns back to ...
0
votes
0answers
18 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 ...
0
votes
1answer
17 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. */ ...
0
votes
1answer
20 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
15 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 ...
0
votes
0answers
11 views

Before the control rendering tier price template, how to check whether the product having tier price or not in magento 2

How the magento control checks whether the product render the tier price template or regular price template ? How can we do some functionality, before the control reads price template ?
0
votes
0answers
17 views

Apply special template for product page

I would like to apply special template file following an admin product configuration, for example, I have a dropdown product configuration list named layout which have two options: total and normal, ...
0
votes
2answers
17 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.
0
votes
1answer
24 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 ...
0
votes
1answer
11 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,...
0
votes
0answers
28 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 ...
0
votes
1answer
30 views

How do I get the language code in the product price amount template file?

How can I get the current language code in Magento_Catalog::product/price/amount/default.phtml?
0
votes
0answers
35 views

Magento 2 layout and template overload in child theme not working

Good Afternoon All, I am having trouble with overloading a template for Magento 2 "module-catalog" module. My overload in the child theme would be the 4th overload in the chain and it is not ...
0
votes
0answers
12 views

Send Attachment within a template mail Magento 1.9

I got this error "Invalid method Mage_Core_Model_Email_Template_Mailer::createAttachment(Array ( [0] => my content ) )" while trying to send an attachment within an email an here is my ...
1
vote
1answer
36 views

Change parts of email template

I want to change the email template "New Order (Magento/luma)". I want to remove the SKU column from order items table, and I think the following line will send me to the file where I must ...
1
vote
0answers
47 views

Call to a member function getLoadedProductCollection() on boolean Search Query issue

im trying to separate the search query text from result.phtml and place it in its own template. So basically ill have the product collection in results.phtml, and then the search query text "your ...
0
votes
1answer
24 views

Is it officially reccomened to add a totally new phtml template file in a theme, one which doesn't override an existing template?

Magento's documentation (https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-walkthrough.html#template-customization-walkthrough) describes how to customise an existing ...
0
votes
1answer
219 views

Magento 2 Knockout bind on ajax response

I am going crazy with knockout on Magento 2, I am new to knockout and I cannot understand what I am doing wrong. I know there are some related questions posted there but each one is different from ...
0
votes
0answers
25 views

Make product data tabs collapsed by default

I want all product data tabs on the product details page to be collapsed by default. I edited this line in app/design/frontend/<Namespace>/<theme>/Magento_Catalog/templates/product/view/...
3
votes
2answers
115 views

Magento 2 - How does getShippingMethodTitle know the method title in module-tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js

I try to understand knockoutjs and requirejs more but I fail to understand the following case. In checkout the shipping method title is showing in the summary This is the template: vendor/magento/...
0
votes
0answers
18 views

Alterate final_price rendering

I want to alterate under specefic conditions the final_price in the front product view (not changing his value but only adding some text). Ex : Instead of printing 5€ , I will print 5€ HT In order to ...
0
votes
0answers
20 views

Magento 2 - Load html of a template from PHP class

I have a php class where I am generating some HTML and returning it. private function _generateNote($expressRule) { if ($expressRule["hasNotAllowedCategories"]) { $note = "...
1
vote
0answers
77 views

Magento 2 Error filtering template: Warning: filesize ()

Error filtering template: Warning: filesize(): stat failed for http://localhost/jaipurbkp/pub/media/catalog/product/s/c/screen_shot_2020-10-03_at_2.37.35_pm.png in C:\wamp64\www\jdrbkp\vendor\magento\...
0
votes
1answer
12 views

Magento 1 : Issue with Template override

How to override this file in magento 1 using module ? app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml
1
vote
1answer
29 views

Magento 1 - How to override phtml file in module?

I am using magento 1 I am trying to override the below phtml file in module app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml Any thoughts ? Thanks
1
vote
1answer
22 views

Override Block & Template File in Magento 1

What is the best way to override the below files theme/module & how one can override it ? app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php app/design/adminhtml/default/default/...
0
votes
1answer
169 views

Magento 2 - override knockoutjs template located in base folder

I need to change the value of the maxinput field in the knockoutjs template vendor\magento\module-ui\view\base\web\templates\form\element\input.html so I have to replace the template with my own ...
0
votes
1answer
13 views

several times a day my pages come in written lines, clearing the cache helps, what goes wrong

several times a day my pages come in written lines, clearing the cache helps, what goes wrong magento 2.2.5
0
votes
1answer
22 views

Override phtml template file

Simple issue : This is one of magento template core file : vendor/magento/module-sales/view/adminhtml/templates/order/totals.phtml How can I overide it ? I tried to create this one but it failed app/...
3
votes
3answers
197 views

Magento 2: How to get custom attribute value in new template

I need to get the value of a custom attribute on the product page, as I want to display different sizechart per attribute. For this reason, I have created the following .phtml to get the value of the ...
0
votes
1answer
42 views

How to override steps-wizard template file in magento 2.3?

How to override the steps-wizard template file in Magento 2.3? I need to override Magento_ConfigurableProduct::catalog/product/edit/attribute/steps/select_attributes.phtml. above file define in vendor/...
0
votes
0answers
97 views

Magento 2 - Use multiple block classes in template

I try to show a block in the header which shows different content, depending on whether the user is logged in or not. If the user is logged in, then I show: If the user is NOT logged in, then I like ...
0
votes
0answers
38 views

Magento 2: Refresh a widget at regular interval

I have developed an extension to provide a widget to list featured random products on CMS pages. The requirement is to refresh this list at regular interval without caching. Is there any option to ...
0
votes
1answer
42 views

Override magento 2 module file

I'm trying to override a file in my theme, but its not showing. The file is located in vendor/mollie/magento2/view/frontend/web/template/payment/creditcard-with-components.html. location of my file is ...
0
votes
1answer
45 views

I have created a custom module for backed to add menu and submenu but it shows me on phtml file in Magento 2

I have created a custom module for back end Menu and sub menu but it shows me an error for phtml file. 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template ...

1
2 3 4 5
28