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
1answer
20 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
49 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
30 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
1answer
22 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
22 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
1answer
22 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
16 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
32 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 ...
0
votes
1answer
61 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-...
0
votes
0answers
23 views

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

What is the Relations between blocks and templates ? Pick 3 options. A) - Single block can have multiple template files. B) - Multiple block can have single template files. C) - Single Block instance ...
0
votes
1answer
25 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
26 views

Shipment Label Change

I want to know that form which file this label is coming:
0
votes
0answers
29 views

Magento2: How to show Open street map on category page

I am trying to place the OSM map on the category page with the location marker. For this purpose, I have created a template module, but it is not loading a map on the page. On the page is just a gray ...
0
votes
1answer
25 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
89 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
47 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
26 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(...
0
votes
0answers
11 views

Creating an element through the admin panel and getting it in the template

How to create a separate part of the functionality in the admin panel that will look and work similarly to the products, but will be a separate functional. For example, in this part of the admin ...
1
vote
1answer
42 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
21 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="...
0
votes
0answers
5 views

Magento 2 - Where to find information in the documentation about how to load a template in a CMS site?

You can load a template in a CMS page like this: {{block class="Magento\Framework\View\Element\Template" template="{Vendor}_{theme}::fotorama_slider.phtml"}} Where can I find more details about ...
1
vote
1answer
21 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
0answers
19 views

Not able to set layout in magento 1.9

Not able to set layout in magento 1.9. When i am setting catlog category> themes>layout and check the checkbox and save.It not saves the layout.And what is the meaning of checked and unchecked in 1.9. ...
0
votes
3answers
39 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 ...
0
votes
0answers
30 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/...
2
votes
1answer
52 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
19 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
5 views

Product Options Template Font Issue

Issue- Font colour on template has gone to white. (no changes have been made) Same product is on another multi store website and template colour is correct. Does anybody know how to resolve this so ...
0
votes
0answers
13 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
75 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
39 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
111 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
38 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\...
0
votes
0answers
13 views

Change Price Templates for Related Crosssell etc Only

I want to change the template Magento_Catalog::product/price/amount/default.phtml but only for Crosssell Related and Upsell. Im starting here with related and have tried like below: Step 1 Block for ...
3
votes
2answers
22 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
39 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
34 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
55 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
0answers
9 views

How can I display a static block as the second search result in a product search

I would like to incorporate an html block to serve as a banner as the second search result when someone searches for a product on my site. Example: User searches for shirts result 1. Red Shirt 2. ...
0
votes
1answer
33 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
128 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
37 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
22 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
40 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
0answers
11 views

Magento 2: Knockout Template display messy content during inline - translation

I am getting strange issue while enabling inline-translation. All knockout template display messy (All titles are in curly braces). Why is this happening? Please help and suggest. Thank you in ...
0
votes
1answer
27 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
0answers
30 views

Magento2 - Google Pagespeed : 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 on a magento 2 website with a ...
0
votes
2answers
68 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
0
votes
0answers
39 views

Get current product categories of current store only in Magento 2

I made the following in Magento 1 for a multi-store website: $rootCategory = Mage::getModel('catalog/category')->load( Mage::app()->getStore()->getRootCategoryId() ); $sameStoreCategories = ...
2
votes
1answer
26 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 2 3 4 5 26