As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [template]

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

298 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
1k 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 ...
leo's user avatar
  • 1,198
5 votes
0 answers
272 views

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

I've set up a text swatch for sizes S, M, L. When a size is sold out I want Magento to display the sold out size with a red mark instead of hiding that size option.
Luis Garcia's user avatar
  • 1,599
4 votes
3 answers
7k views

Invalid template file in Magento 2.3

I have been reading the forum but I can't find any solution to solve my case. I have a custom module where I'm getting the error: 1 exception(s): Exception #0 (Magento\Framework\Exception\...
pgarcess's user avatar
4 votes
1 answer
2k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
Roninio's user avatar
  • 141
3 votes
1 answer
436 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 ...
Divyarajsinh Dodiya's user avatar
3 votes
0 answers
162 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/...
Gianni Di Falco's user avatar
3 votes
0 answers
365 views

Magento2 Product add form custom form values not posting in observer

I am Creating custom product add form in magento2.2.2. I have added a new tab after product details & Loaded My custom phtml File into It, First To Post Data from product form to observer, i ...
Rizwan Khan's user avatar
  • 1,889
3 votes
1 answer
915 views

Add filter toolbar to advanecd search page

How I can add filter toolbar to advanced search page. I created catalog_category_view.xml and added the XML below but it does not change the template. <referenceBlock name="product_list_toolbar"&...
gh darvishani's user avatar
3 votes
1 answer
858 views

How Do I Add Styling Or Groupings To Widget Parameters?

I have a custom widget with various parameters. Is it possible to style or add grouping, headings, fieldsets, basically anything to give some space and separation to the numerous parameters? My ...
Shawn Northrop's user avatar
3 votes
2 answers
985 views

Override minicar sidebar price renderer

How can I override a sidebar.phtml from: module-weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml I have tried in the following ways: <referenceBlock name="checkout.cart.item....
marcio's user avatar
  • 31
3 votes
1 answer
112 views

How to work with templates in magento 2

Example.com/customer/account/login/ This page contains three Templates Sociallogin.phtml Login.phtml Newcustomer.phtml I know where these files are located.But i don't know where these files ...
Vignesh Krishnamoorthy's user avatar
3 votes
3 answers
2k 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: ...
Jeroen Stas's user avatar
3 votes
0 answers
554 views

Magento 2.1 : Multiple Image Uploader in Ui Component Form

I am getting this error <div class="row"> <div class="add-video-button-container"> <button id="add_video_button" title="Add Video" data-...
Verdu's user avatar
  • 1,722
3 votes
2 answers
3k views

Magento 2 widget doesn't show - how to debug?

I have a module that is installed in other sites. In one site it doesn't show up when inserted into CMS Pages. {{widget type="Company\Modulename\Block\Widget\Test" template="widget/newsletter/test....
user1324762's user avatar
3 votes
0 answers
623 views

Magento 2 - Display subcategories above product listing

I'm trying to display the first 8 subcategories above the product listing on a select few category pages. I know that I can easily do this using static blocks, but I'd rather use a custom template ...
Paul's user avatar
  • 1,491
2 votes
0 answers
134 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.
J. M. Becker's user avatar
2 votes
1 answer
511 views

Review form in custom template not working Magento 2.3.4

I have created a custom template for the product page based on the attribute value. in my template i used below code to display the review section. <?php echo $block->getLayout()->...
jafar pinjar's user avatar
  • 1,839
2 votes
0 answers
2k views

Magento 2 - Override Swatches renderer.phtml

I would like to override file : app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml In my own theme : app/design/frontend/[VendorName]/[theme]/Magento_Swatches/...
Jimmy Labuche's user avatar
2 votes
2 answers
3k views

Magento 2 - Override template files in module

What is the correct way to override a template file ? I need to display custom text in place of In Stock and Price on the product page. I want to override the template - Magento_Catalog/view/...
coderGeek's user avatar
  • 515
2 votes
0 answers
34 views

How to deal with multiple extensions overriding the same template file?

I have two extensions which load their own template for the block with name customer_form_register in customer_account_create The first extensions overrides the template to add a new field to the ...
Black's user avatar
  • 2,993
2 votes
0 answers
411 views

How to override Magento 2 welcome email upon new customer account creation

I need to customize default Magento welcome email template which is sending upon new customer account creation in my custom module. I'm using the following functions for sending welcome email upon ...
sreelakshmi's user avatar
2 votes
1 answer
3k views

Magento2: Fatal error: Uncaught Error: Cannot instantiate interface

Got the error below: Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Config\DataInterface in /var/www/html/public_html/vendor/magento/framework/ObjectManager/Factory/...
Masud Shaikh's user avatar
  • 1,159
2 votes
1 answer
5k views

Magento 1.9 add layout and template to custom module in admin

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 in the admin area but ...
Victorino's user avatar
  • 121
2 votes
0 answers
35 views

Limit template to only one page in adminhtml

For now I have directly edited this file \vendor\magento\module-backend\view\adminhtml\templates\widget\grid\extended.phtml and I have added a button as you can see from the photo below But this ...
Konstantin Patroev's user avatar
2 votes
1 answer
73 views

How to override template in Magento2?

In my custom module I have overwrote the file app/code/Magento/module-checkout/view/frontend/layout/checkout_cart_item_renderers.xml For overriding cart page with the following code: <page ...
Mahi M's user avatar
  • 2,530
2 votes
2 answers
248 views

Can't override recent order template from custom module

In customer account dashboard there's a recent orders block, i tried to override it like this: app/code/Test/SuccessPage/view/frontend/layout/customer_account_index.xml <?xml version="1.0"?> &...
simple guy's user avatar
  • 2,434
2 votes
0 answers
287 views

Is there a simple way to unset an item in an array added using layout xml?

Magento 2 comes with the following layout update in the Magento_Weee module: <referenceBlock name="render.product.prices"> <arguments> <argument name="default" xsi:type="...
Giel Berkers's user avatar
  • 12.1k
2 votes
0 answers
117 views

Magento 2.1 and symlinks

My server structure is as follows: /var/www/htdocs_webroot/shop -> symlink to: /var/www/shop/deploy_xxxx-xx-xx/htdocs So I can redeploy magento easily and switch back and forth with one simple ...
steros's user avatar
  • 1,612
2 votes
0 answers
120 views

Changes to template files not updating in newly created storeview

I am trying to add a second StoreView that uses its own theme and is accessible by a custom URL. For some reason however, I can not get changes to the template files to display in the frontend. This ...
loeffel's user avatar
  • 722
2 votes
0 answers
248 views

Magento 2.1.0.0 new order email template preview and save 404 not found issue

My website is at magento 2.1.0 version when i load new order email template, it shows below error: Error: The template did not load. Please review the log for details. To correct the error I ...
mith's user avatar
  • 41
2 votes
0 answers
31 views

Recommendations for A/B Testings a block/template

I have a form on my site for customers to request a quote on a product. The form is stored in a template file. I want to test two versions of this form. One form would ask the user to enter their ...
Bryant James's user avatar
2 votes
1 answer
296 views

Magento2 - Get Price without "price-details" AKA Tax

How can I get the price for a product WITHOUT any TAX / Shipping Details? Currently it is echo $block->getProductPriceHtml($_item, $type); and gives out price + price-details (tax etc). Is there ...
Magento2User1337's user avatar
2 votes
0 answers
3k views

Edit magento 2 order 'print' layout

So when u go to My Account -> My Orders and click on view order and then click Print Order then u see a PDF of the order that u just placed. Mine looks all messy : So I want to edit this. Does ...
CompactCode's user avatar
  • 2,427
2 votes
1 answer
464 views

How to use two different price templates / list and detail view

within the following file I can see below shown code: File: frontend/default/ves_fashion/template/common/list/default.phtml Code: <div class="price"> <?php echo $this->getPriceHtml($...
Torben's user avatar
  • 231
1 vote
0 answers
146 views

Getting value of text field in controller?

Magento 2.3 I added a new text field to review.phtml, it looks like that: <input type="text" id="tel" name="pptel" /> Now in my controller I am trying to get that ...
user4095519's user avatar
1 vote
0 answers
33 views

Disallow Comma Validation Rules

I am using this mixin for the custom validation rules in the below template for the first and last name Template: /vendor/magento/module-customer/view/frontend/templates/widget/name.phtml require js :...
Rana Zain's user avatar
  • 481
1 vote
2 answers
24 views

how to pass js window varibles from templates to template files in magento? I want to get system config values in the web folder

I want to pass js window variables from view/frontend/templates/form.phtml to view /web/template/shipping-information.html and view/web/js/shipping-information.js How can I do it? it is because I want ...
Mohmad Ashik M A's user avatar
1 vote
1 answer
239 views

Magento 2 Invoice Emails: Tax row alignment in subtotals

So I wanted to change the layout of my invoice emails, especially order totals. I wanted labels to align right. I copied my totals.phtml file in my theme and added my styling. <?php /** * ...
Shivani Singh's user avatar
1 vote
1 answer
113 views

Calling the welcome message in different template?

Is it possible to call the default welcome message when user is logged in ("Welcome, customer.fullname") in a different .phtml? I'd need this message in my Magento_Customer/templates/account/...
zlep's user avatar
  • 158
1 vote
0 answers
224 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 ...
Brad Archer's user avatar
1 vote
0 answers
218 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\...
Gagan's user avatar
  • 549
1 vote
0 answers
48 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 ...
IvannVerano's user avatar
1 vote
1 answer
124 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?
Nafsss's user avatar
  • 720
1 vote
0 answers
30 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 ...
bernieu2's user avatar
  • 594
1 vote
0 answers
25 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()-&...
Sam's user avatar
  • 163
1 vote
1 answer
415 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"); ?> ...
chanchal's user avatar
  • 397
1 vote
0 answers
40 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 ...
Abid Malik's user avatar
1 vote
0 answers
219 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 ...
stanhook's user avatar
  • 121
1 vote
1 answer
628 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-...
hari's user avatar
  • 11
1 vote
1 answer
518 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 ...
user3328090's user avatar

1
2 3 4 5 6