Questions tagged [template]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
69 views

Magento 2 : What template engine is used for email templates?

What template engine is used for Magento2's email templates? I've not been able to get confirmation on this.
0
votes
1answer
202 views

How to display crossed visual swatches for not available sizes in Magento 2?

I've set up a Visual swatch for sizes S, M, L. When a size is sold out I want Magento to display the sold out size with a red cross mark instead of hiding that size option.
1
vote
1answer
446 views

Magento 2.3.* - How to override ViewModel for override block?

Magento 2.3.* I want to override ViewModel for the override block (custom.block.name). But the issue is my .phtml a file called from the block and it is calling on some condition. Not every time call....
1
vote
1answer
195 views

Magento2 - Search preview not showing up

I have a custom template file in which I am trying to call search block as showing up in header. In header the search is rendering through <?php echo $this->getChildHtml("topSearch"); ?> ...
1
vote
0answers
23 views

Template notations in magento

I was working with the Algolia search module in Magento 2 and foud something like below in the template files. Can anybody let me know what this notation is called and where can I learn more about ...
0
votes
1answer
44 views

Add block from Luma parent into child theme

I'm using a custom child theme with Luma as the parent, I have a custom page layout xml file and I'd like to include a block that's defined in the parent theme: <block class="Magento\Theme\Block\...
1
vote
3answers
91 views

Magento2.3: How to show the template file in a particular category page?

I have a custom module and on that I have a template file. I want to show that template in a particular category instead of it displaying in all the category pages. How can I achieve that? Anyone ...
0
votes
1answer
237 views

Magento 2 How to call template file in block file

My block file form.php and I want to call phtml file in this block to display table in this custom admin form, I have no created a layout for this phtml file, if is there any other way to display the ...
0
votes
3answers
2k views

Email template preview is not working on live Magento 2

When i try to view the template in Live i am getting a blank screen but if try to view the template locally or on staging it works without any issues. Can anyone give me a hint or any help idea to ...
0
votes
1answer
64 views

Modification to .phtml does not render

In content/page homepage I insert a widget from the porto theme: {{block class="Smartwave\Filterproducts\Block\Home\LatestList" name="latest_product" product_type="4" product_count="50" category_id="...
0
votes
2answers
38 views

Magento Commerce Cloud 2.3 which template(s) for products displayed by page builder

In my custom theme I need to modify the product list/grid templates for products that were placed there using the page builder. Can anyone please tell me where I can find these template files? Thanks
1
vote
0answers
52 views

Magento 2 - Show Subcategories and Images on Category Template

I want to show subcategories and the images on the category page. If the user clicks on Apparel the page would show all the subcategories with the subcategory image. I placed this code in my theme ...
0
votes
1answer
694 views

How to create a Block, Layout and Template for backend module in magento 2

I have doubt as how to create Backend Module using block,layout and templates. After creating the block,I have assigned the block in app_appdashboard_index.xml file and I called the block page ...
1
vote
1answer
143 views

How to create a frontend custom page module with view template files in magento 2.3

I have doubt as how to create Frontend Module with View template files. I have created Module using this reference Magento Documentation "https://devdocs.magento.com/videos/fundamentals/create-a-new-...
2
votes
0answers
143 views

Magento 2 Tricky Certification Question - Relation between Block and Templates files [duplicate]

Case 1: Single Block & Multiple Templates No this can not be true as at a time only 1 template can be assigned to any block. you can not assign multiple templates to any block. the block template ...
0
votes
1answer
147 views

How to overwrite a payment method js renderer component?

Resolved: Seems the error has been caused by the requirejs and my lobster hands :) I rewrite a default Component and trying to extend it inside own component which rewrites a default component: ...
1
vote
1answer
35 views

Shipment Label Change

I want to know that form which file this label is coming:
0
votes
1answer
170 views

Override Amasty template

New to magento, I'm trying to override vendor/Amasty/Promo/view/frontend/templates/notification.phtml called in vendor/Amasty/Promo/view/frontend/layout/default.xml So I've added the file in this ...
0
votes
1answer
2k views

How to pass text input value to js in magento 2 knockout js?

In my template.html file, I am having only the input field. After I complete entering the text in the input field, I need to pass the value to the js file without any button click. How to achieve this ...
0
votes
4answers
50 views

How to add css in custom module using layout file in Magento2?

I wan't to add bootstrap.css to a template in a custom layout.xml, this is my code: view/frontend/web/css/bootstrap.css here is the css file view/frontend/layout/pakke_trackshipment_info.xml <?...
0
votes
1answer
48 views

Magento 2 How to pass data from Controller to Block

I need to send data from controller to Block, I have used many ways but it does not work. I'm trying this way: Controller.php public function execute() { $order_id = $this->getRequest(...
1
vote
1answer
77 views

Disable (product data items) tabs in Product page

I want to disable tabs in product pages, i mean not display product data items (description, more information,Ratings) as tabs. So I override web/css/source/sections.less And remove tabs and ...
0
votes
1answer
55 views

Adding div around footer elements causes issue

I'm trying to add a simple div around the copyright & bug report links in the footer. I can achieve this by doing this: <referenceContainer name="footer-container"> <container name="...
1
vote
1answer
123 views

Magento 2 - how to reference a template of my theme in a layout file?

I have this file app\design\frontend\company\mytheme\web\templates\header\foobar.phtml How can I reference it in a layout file e.g. in app\design\frontend\company\mytheme\Magento_Theme\layout\...
0
votes
3answers
124 views

Magento2.3: How to set the border bottom for whole header?

I have a megamenu in header and want to set the border bottom for the whole header and it should be aligned with the megamenu border but its not working as expected. I have tried that into the ...
2
votes
0answers
81 views

Set a custom html template for a specific shipping method?

While creating a custom shipping method works great, how to set up a specific template for specific shipping method in the checkout? Seeing the vendor/magento/module-checkout/view/frontend/web/js/...
4
votes
1answer
588 views

What's the difference between element and elementTmpl

In UI components, what's the difference between setting template and elementTmpl in a component's <config/> node? <item name="config" xsi:type="array"> <item name="template" xsi:...
0
votes
2answers
36 views

Trouble in getting in customer data using block class

I'm having trouble in getting the customer details using block class. I want to show the customer name after he/she logged in using block class. I can do it via object manager but not through block. ...
0
votes
0answers
71 views

Magento 2 get Controller data in the same page it was sent

I got help to accomplish send data from Controller to a Block, and then display the info from Block in a template. The thing is that I want to send a form and display the data from that form in the ...
0
votes
0answers
332 views

Magento 2 Return Controller data in the same page

I got help to accomplish send data from Controller to a Block, and then display the info from Block in a template. The thing is that I want to send a form and display the data from that form in the ...
0
votes
2answers
139 views

Invalid template file for custom module

I am Creating a simple layout block and template, but it is giving error Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Test_Module::stock_left.phtml' in ...
0
votes
1answer
2k views

Magento 2 pass data from Controller to Block and display in Template

I'm a little bit stuck. I want to send a form and display it in a phtml. Here is my code: 1. Controller Search.php <?php namespace Vendor\SearchStores\Controller\Index; use Magento\Framework\...
0
votes
1answer
70 views

Magento 2 - Include css from module in template

I developed a new extension. I have some CSS which I need to include on some templates. CSS: app\code\Fekete\Newsletter2Go\view\frontend\web\css\main.css Block: \app\code\Fekete\...
3
votes
2answers
38 views

Why does the default Magento theme have /html subdirectory?

If you look at https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/Theme/view/frontend/templates , there's phtml templates in this folder, but also in a subfolder called /html ...
0
votes
1answer
247 views

Create block and use it in template - Error filtering template: Invalid method

I created a block and a template. I call the template in a CMS site. Block: \app\code\Fekete\Newsletter2Go\Block\Form.php <?php namespace Fekete\Newsletter2Go\Block; /** * Dashboard Customer ...
0
votes
2answers
234 views

Magento 2 - find out if text is from static block

I try to replace the footer with my own, but I have no clue how. I activated template hints, but it does not show any hint if this is a static block. How can I modify this ?
0
votes
4answers
178 views

How to override template in newsletter/manage?

I try to override the following template which is under www.example.net/newsletter/manage with my own /vendor/magento/module-customer/view/frontend/templates/form/newsletter.phtml Block class: ...
0
votes
1answer
41 views

Where can I restructure the html for the magento 2 product view page?

I am trying to theme my product view page but I cannot find the correct file to override in order to pull in all of the data where I want it. in my /app/design/frontend/theme/Magento_Catalog/...
1
vote
2answers
213 views

Override template and block from a module?

I am developing a newsletter extension. I try to override the template /vendor/magento/module-customer/view/frontend/templates/account/dashboard/info.phtml and the block Magento\Customer\Block\...
0
votes
1answer
45 views

I am trying to add a phtml through xml. But I can not add. Code shared below

trying to add a phtml through xml to account page sidebar. but i am not getting it right. the xml code is:
0
votes
1answer
28 views

How do I get around Magento 2's Template Cache for a dynamic snippit

I am trying to create a shipping time indicator by pulling in the current time and if it falls within our shipping rules, it will display ships today, or ships tomorrow. That being said, I am running ...
0
votes
2answers
195 views

How to show message box in Magento 2

How to show the message box in Magento 2 (on the home page). message box working the whole site except for the home page.
0
votes
1answer
97 views

Magento Trying to display {{block type=“catalog/product_list” template=“catalog/product/new.phtml”}} on homepage

Hi I am trying to display the current block {{block type="catalog/product_list" template="catalog/product/list.phtml"}} Using the CMS Wysiwg for my home page. I have set the permissions to display ...
0
votes
1answer
133 views

Magento2 - Google Pagespeed Insight : any idea why it takes account of desktop css?

My question might not be magento specific, but I'm curious, as I couldn't find the answer elsewhere (or failed to find the correct terms). When I use Google Pagespeed Insight on a magento 2 website ...
0
votes
2answers
345 views

How to override Adminhtml template files in Magento 2.3?

How to override Adminhtml template files in Magento 2.3? In a proper way. File to override: vendor/magento/module-sales/view/adminhtml/templates/order/totals.phtml
2
votes
1answer
69 views

Magento 2: Customizing the template files

When we customize the core template files in Magento 2, how should we name the folder in the custom theme?. For example, I want to customize the template file in \vendor\magento\module-advanced-...
1
vote
1answer
121 views

Custom Module's template override not loading initially unless the page is refreshed

I have the below template override in a custom module, the file path is: app/code/Vendor/Module/view/adminhtml/layout/sales_order_create_index.xml <?xml version="1.0"?> <page xmlns:xsi="...
0
votes
0answers
62 views

Unable to clear Magento cache

Got some really strange behaviour with Magento 2.2.8. Seems like the cache (using Magento built in cache) and site environment settings are locked and will not change. I have disabled caching through ...
0
votes
0answers
50 views

Magento 1.9 - Replace template files by store ID

Let's say i want to use different template files on storeID 3. The modules frontend folder is: checkout If the storeID is equal to 3 I want Magento to use customcheckout instead. Is there a way ...
0
votes
2answers
839 views

magento 2.3: get CMS page content in template file

I want to get CMS page content and title in phtml template file. How can I get this? I am trying below code to get content but it's not working - $objectManager = \Magento\Framework\App\...

1 2
3
4 5
28