Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
3answers
30 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 ...
6
votes
1answer
778 views

Override Wishlist view.phtml from custom module not working

I tried to override wishlist view.phtml which loaded at customer account page like this: app/code/Test/Salesman/view/frontend/layout/wishlist_index_index.xml <?xml version="1.0"?> <page ...
0
votes
0answers
25 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/...
1
vote
1answer
19 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
15 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. ...
1
vote
1answer
39 views

Magento 2 How to remove template in checkout page?

We have a custom template file and want to display it on all the pages except the checkout page. However, it shows even in checkout page. We have used the below code in our theme default.xml. <...
2
votes
2answers
1k views

How to create custom drop down field on checkout page in Magento 2?

How to create custom field on checkout billing address in magento2? I want simple drop down on checkout page just we can use for admin order and this field also saves in the database table like ...
2
votes
1answer
425 views

Magento 2 set block template in layout vs in block

There are two ways to set a blocks template. Either in the block using $this->setTemplate('Vendor_Module::template.phtml'); or in layout <block class="Vendor\Module\Block\BlockName" name="...
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
2answers
731 views

Custom magento 2 theme not showing up up on content/design/configuration

Hello Developer community, I have been trying for two day to figure out how I can customize my magento template. Recently I have become stuck on being able to pull up my new magento theme in the ...
0
votes
0answers
23 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
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
1answer
42 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
2answers
31 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 ...
1
vote
3answers
1k views

Add product name in product view within a new phtml?

I copied catalog_product_view.xml and pasted it into app\design\frontend\Mytheme\DreamShop\Magento_Catalog\layout folder and code is added before the default.phtml <block class="Magento\Catalog\...
0
votes
1answer
35 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\...
1
vote
3answers
7k views

Where can I change the Shopping cart title?

On the checkout/cart page I need to change the Shopping cart title. Where can I find it in the code?
0
votes
0answers
11 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
21 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
23 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
27 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
1answer
31 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
1answer
745 views

Allow symlinks not working

I have a preprod Magento environment and I want to allow symlinks in template setting. I allowed it via Configuration->Advanced->Developer->Template Setting but it's not working. It has worked before....
0
votes
1answer
647 views

Cannot Load Page Items

On the front page of our site, some of the modules are not loading with a simple error message in place. "We're sorry, an error has occurred while generating this email" On looking in the exception ...
1
vote
2answers
91 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
4answers
35 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: ...
3
votes
3answers
5k views

Magento 2 Create custom 404 page for not-found products

In Magento 2 I am looking to create a module that adds a custom 404 page specifically for not-found products in the catalog, however keep the default 404 page for all other pages. My initial thoughts ...
3
votes
6answers
696 views

How to turn on Template Path Hints in Magento2 Through Code edit

I know that you can turn template path hints on in Magento2 through the Admin Panel at Stores > Configuration > ADVANCED > Developer. Although in Magento 1 I find it much quicker to temporarily edit ...
0
votes
1answer
1k views

Product Page Layout

I'm trying to find a way to add a new custom layout for some products so I can just go to the Design Tab and choose the "Page Layout" from the dropout. I can only find CMS Layout pages in google. Also ...
4
votes
8answers
16k views

Magento 2: How to get current Currency and symbol in PHTML File?

How can I get current currency and currency symbol in Magento 2 in a template (.phtml file)? Without creating a block
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
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:
2
votes
1answer
1k views

Add button to admin grid magento 2

How can I add a button in the Adminhtml Reports>>Sales>>Orders
1
vote
2answers
155 views

magento2: conditional rewrite the template

I am rewriting the search block but i want it to conditional based on system configuration. If module is enabled then it will rewrite the template otherwise default will be loaded. <referenceBlock ...
2
votes
3answers
2k views

Magento 2 remove Gift Cards Cart Summary

Working to remove the Gift Card feature on Magento 2 Cart summary section. Having issue getting this working. Have created the following file: .../app/design/frontend/***/***/Magento_Checkout/layout/...
2
votes
1answer
2k views

Magento 1.9 add layout and template to custom module in admin

I am new to Magento. When I try to create a custom module that shows two tabs on the main page with the option to change titles, backgrounds, and colors, I was successful in adding the module's tab ...
0
votes
1answer
20 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 ...
9
votes
4answers
4k views

Magento 2 - How to apply Slick Slider to Recently Viewed Widget

I have created a code but slider is not showing up in recently viewed products. Here is my code - I have downloaded slick js and css from the following link http://kenwheeler.github.io/slick/ Then ...
0
votes
2answers
29 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
9 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 ...
17
votes
6answers
10k views

How to get store phone number in magento 2

I want to display phone number saved in magento admin in frontend in magento 2. Like in magento 1.9 its like $storePhone = Mage::getStoreConfig('general/store_information/phone');
0
votes
1answer
22 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
24 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 ...
2
votes
2answers
748 views

Magento2: Cross-sell not showing in cart, missing crosssell.phtml file

For some reason, my theme is missing the crosssell.phtml file that shows cross-sell products in the cart. I found out from my Magento2 system.log file; [2017-03-26 21:21:11] main.CRITICAL: ...
4
votes
1answer
875 views

Customer name is missing in welcome message after login

In header, there is a welcome message which can be configured in the Magento backend. However after login, i found that the customer fullname is not insert into the welcome message,(i.e. always ...
0
votes
1answer
846 views

How to override or extend Product List Page template to show Icon on Product Images in Magento Extension

Consider the Below Image I want to show an Icon on the Image of each product. I am developing an extension and I want to do this task via that extension, independent of theme. How can I achieve this ...
3
votes
1answer
52 views

Magento 2.2.5 Newsletter (/newsletter/manage/ ) management generates blank page

Newsletter (/newsletter/manage/ ) management generates blank page
0
votes
2answers
46 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
3
votes
2answers
2k views

How to get processed email template using template id in Magento 2?

I wanted to load a particular processed email template by using its id. how to process this in magento 2. in magento 1.x the code is like $sTemplate = Mage::getModel('core/email_template') ->...
0
votes
0answers
17 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 = ...