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
32 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
108 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
13 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
32 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
265 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
24 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
469 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
52 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
148 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
47 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
51 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
63 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 ...
0
votes
1answer
46 views

I have created a custom module for backed to add menu and submenu but it shows me Error?

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

Use phtml in stead of html for emails in magento 2

Im overwriting the template vendor/theme/Magento_Email/email/header.html I want to add php in this template. Is there a way to include a template in header.phtml? I currently have this which doesn't ...
1
vote
3answers
239 views

Magento 2 - How to override knockoutjs template?

I try to override the following template from my own module vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html but I don't find the file where I can override it, I ...
0
votes
1answer
150 views

Can't override template from own module

It seems to be impossible to override the template vendor\magento\module-checkout\view\frontend\templates\cart\item\renderer\actions\edit.phtml from your own module e.g. by using layout updates. (The ...
0
votes
0answers
116 views

How to create template for WYSIWYG editor magento 2

I have problem with template in wysiwyg editor on admin page. In Catalog > Products > Content tab we have wysiwyg editor, but I'm confused were I need to create templates for selecting. It ...
0
votes
1answer
27 views

How to do use a different theme on search result page instead of default?

How do I make the search results page use a different theme like you can on category pages? As, I'm using a different theme for a catalog on my store, but when you use the mini search it pulls the ...
0
votes
0answers
18 views

How to override adminhtml template file in magento 2.3.2 [duplicate]

I want to override account.phtml file located at /vendor/magento/module-sales/view/adminhtml/templates/order/create/form How can i do that?
0
votes
1answer
29 views

Add a script to a template file

This is the default vendor/magento/module-checkout/view/frontend/layout/checkout_onepage_success.xml This layout defines between other things : <block class="Magento\Checkout\Block\Onepage\...
1
vote
0answers
18 views

Move block after size atributte of product page [Magento 2]

I want to move a block and put it after size attribute because when I click this button magento detect that I add to cart: I use this to move after add to cart, but I don´t known to move to the other ...
1
vote
1answer
35 views

How to override a template file in magento 2

I want to override final_price.phtml template file located at /vendor/magento/module-grouped-product/view/base/templates/product/price/ How should i do that?
1
vote
1answer
37 views

file not created in pub/static

I have copied the file located in: vendor/magento/module_checkout/view/frontend/web/template/minicart/item/default.html to my theme dir:app/design/frontend/MyVendor/Mytheme/Magento_Checkout/web/...
1
vote
0answers
29 views

Attempting to display specific custom attributes in a particular table format

This may not be the best place to ask this question as it might be more of a php question but I took up building a Magento site as a hobby during covid-lockdown so I thought I'll ask here - apologies ...
6
votes
1answer
903 views

Sanitizing HTML output in templates in 2.4

Before 2.4 the way you could sanitize an html value in a template was to use $block->escapeHtml($valueHere);. Where $blick is the instance of the current block. This still works in 2.4, but the ...
0
votes
1answer
119 views

How to override adminhtml template file in magento 2

I want to override one adminhtml template file located at /vendor/magento/module-sales/view/adminhtml/templates/order/create/form/account.phtml What steps i need to follow?
2
votes
2answers
92 views

Error filtering template: The entity that was requested doesn't exist. Verify the entity and try again

I am trying to fetch the order details $order = $objectManager->create('\Magento\Sales\Model\OrderRepository')->get($orderId); Order id is correct 000000020. In var log main.CRITICAL: The entity ...
1
vote
0answers
18 views

Display Custom CMS Fields in Magento 2 Template

I'm can't seem to find any documentation on how to get custom CMS fields in a PHTML template in Magento2. The following snippet did it in Magento2: Mage::getBlockSingleton('cms/page')->getPage()-&...
0
votes
0answers
19 views

Update/overwrite Third party module which is installed in vendor folder

I have two extensions installed via composer and that is in vendor folder. I have done some customisation on those modules ie: updating the files in the vendor/mymodule/ folder. Now after a Magento ...
0
votes
2answers
15 views

Can't read new product attribute in template

I added a new attribute to a product. The attribute is named "is_brand_new". The product shows in the catalog product view in the upselling and related slider. But the new attribute is not in the ...
0
votes
1answer
40 views

Best method to use helper in any template

It seems to be impossible to use a helper in the template Magento_Catalog\templates\product\list\items.phtml. I have tried it via argument injection: app\design\frontend\company\base\Magento_Catalog\...
0
votes
0answers
23 views

Overriding the product template, where to find the default file?

Inherited a project and am not familiar with Magento enough to know where to find things. There are a bunch of errors on our product detail page (app/design/frontend/{name}/{dir}/Magento_Catalog/...
0
votes
1answer
366 views

Magento 2 : How to change html/css classes of onepage checkout in custom theme

I'm creating a new theme from scratch, I would like to change the html code of the checkout/#shipping page. However, the template (Magento_Checkout/onpage.phtml) containing the html code that I would ...
1
vote
1answer
72 views

can't update a page template

Hi all and nice to meet you. Some days ago I've modified vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml in order to add a static phrase to every product page. I ...
0
votes
1answer
352 views

How to change html output of method “getItemHtml” in custom theme

I'm overriding the file Magento_Checkout/templates/cart/form.phtml, I stumbled upon some php code generating html code which I can't find its origin Here is the code <?php foreach ($block->...
0
votes
1answer
115 views

Display mini search form in template?

Magento 2.3.3 I want to display the mini search form form.mini.phtml in a template. In Magento 1 I did it like this: $this->getLayout()->createBlock('core/template')->setTemplate('...
2
votes
1answer
906 views

Magento 2 email_order_set_template_vars_before observer triggers only when I resend email in the admin

I created a new template var using email_order_set_template_vars_before observer and it works when I send email new order through the Magento admin. But it does not trigger when new order is placed. ...
0
votes
2answers
62 views

Invalid template File after installing on Windows

I am just freshly installed Magento 2.3 on Windows 10 . When i load the url for front end , the templates are not loading correctly and there is Dark blank page when loading admin url. I found this ...
0
votes
1answer
29 views

Issue with calling attribute value on product view - Magento 2

I have two custom product attributes that I'm using in my product page template files. One of them doesn't seem to work and I'm wondering if it's something to do with the attribute code. The ...
0
votes
2answers
217 views

Add static page via custom theme

I created a custom Theme for our shop which works pretty fine. Just one thing is bothering me: I created some words in the footer and want to link them to custom pages which only have static content. ...
0
votes
1answer
158 views

Override comment history order in backend

I'm trying to override the template for the comment history of a order (the part next to the total of the order). this is my path to layout .xml : app/code/Portail/Fournisseur/view/adminhtml/...
0
votes
1answer
264 views

Magento 2 How I can add a div inside `product-image-container` in Magento to catalog pages

I want to add a New <div> in inside class="product-image-container" in Magento 2 I have searched and found that this class is rendered like this $productImage = $block->getImage($_product, $...
0
votes
1answer
59 views

Magento 2 - Override core template in own module

I want to override the template Magento_Customer/templates/form/register.phtml in my own module. At the moment the override is in my theme: app/design/frontend/company/base/Magento_Customer/...
0
votes
4answers
154 views

How to know which template I am currently working in magento 2

good morning everyone, I am a little bit new on Magento 2.x, I am working the full time make some changes in some view which contains a template but I suffer and struggle to know which template in ...
0
votes
1answer
61 views

Filter custom attribute in product collection

I have created a custom attribute with name product_deisgn_proof. I want to filter this attribute using product collection in custom template file. When I try to fetch collection of product in an ...
0
votes
2answers
114 views

Magento 2 : Getting PHP variable in js extended template

I added a step in Magento 2 checkout process. by extending a template using .js file return Component.extend({ defaults: { template: 'vendor_module/mytemplate.phtml' ...
0
votes
2answers
60 views

How to get data from a model without calling the objectManager in the template

I have a custom Order model, it has a method in it @method int getIncrementId() I have a template to transfer the id of the current order/app/code/Qq/Www/view/frontend/templates/success/index/...
0
votes
1answer
432 views

Custom catalogsearch layout and template override not displaying custom block content [EDITED]

Edit: Could not having crontab and cron set up affect compiling the layout files and be related at all to the custom layout not loading? I have since moved all my logic out of the app/design/frontend/...

1
2
3 4 5
28