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
2 answers
44 views

Insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in register.phtml

I want to insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in the customer registration form - called in the Magento_Customer::form/register.phtml ...
0 votes
1 answer
1k views

Failed to call function "on click" in magento 2

I have created the add button using the below block file. On button click, I have called return FilterControl.addItem() from my template file seo.phtml But it shows errors like below Uncaught ...
0 votes
1 answer
1k views

Magento2 render custom block in adminhtml layout.xml

I can not render my custom block within my custom template, Point is on newsletter subscriber, I extend newsletter_subscriber_form.xml, Add container within my block but it says that template is ...
0 votes
2 answers
647 views

How can i insert custom tracking url in Order confirmation Email Template?

I want to insert my custom tracking url in Order Confirmation email and url is https://vitalticks.shiprocket.co i put code like this Track you Order here:Vitalticks Order Tracking Page But it is not ...
0 votes
1 answer
1k views

Magento 2 Knockout bind on ajax response

I am going crazy with knockout on Magento 2, I am new to knockout and I cannot understand what I am doing wrong. I know there are some related questions posted there but each one is different from ...
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 ...
0 votes
2 answers
2k views

Magento 2 Custom Module Controller getLayout , createBlock, getBlock , append Fatal error:

namespace My\Module\Controller\Index; use Magento\Framework\App\Action\Context; class Index extends \Magento\Framework\App\Action\Action { protected $_resultPageFactory; public function ...
0 votes
0 answers
12 views

how to update or delete category tree data

The query is the following. I want to update this field in magento, but only accept or replace the new values ​​to be entered with the values ​​that already exist, doing it massively using a template, ...
1 vote
2 answers
3k views

how to trigger click event in M2

In my header section I have user name and if user have access to different location then he has button saying click me. I want to send ajax call on this button. But JS is not working. Can anybody help ...
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: ...
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/...
18 votes
6 answers
17k 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
1 answer
1k views

Magento 2 - Move Button from Middle Column to Side Bar Section

Hello I need help moving my finance button from the middle column of the product page over to the fixed right side bar of my product page below Add to Cart button. The finance button is a module ...
12 votes
6 answers
19k views

Magento 1 - Load js in footer

<reference name="footer"> <action method="addItem"> <type>skin_js</type> <file>js/fabric/tool/controller_tool.js</file> </action> </...
0 votes
5 answers
1k views

New order email template - price decimal place

we have amended our Magento 2.1 to use and store prices with 4 decimal places. But then used some JS to trim/round-up on the frontend to 2 decimal places. However, on the email templates, the price ...
0 votes
1 answer
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 ...
0 votes
2 answers
61 views

attribute on category page don´t show in second store view

I show a few attributes in my categories(list view) on my default store view and that is working well. Magento ver. 2.4.3 Now I created a second store view but unfortunately the attributes didn´t show ...
2 votes
3 answers
6k views

Add custom template to existing widget (product_list)

I would like to make use of a product list widget but I need to use it with my own template file. I want to create a widget via content -> widgets. This is different from utilizing a widget from a ...
1 vote
5 answers
3k views

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

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 backend admin panel. I have ...
0 votes
1 answer
30 views

What are the security risks associated with a Magento 2

What are the security risks associated with a Magento 2 website, and how can you mitigate them?
3 votes
1 answer
90 views

Magento 2 community edition

What are the key differences between Magento 2 Community Edition and Magento 2 Enterprise Edition, and which one is the best fit for your business needs?
0 votes
1 answer
2k views

Javascript in ajax loaded modal popup

I'm working on a module that needs to open modal window and show some content inside of it + some js logic. So I load template with ajax request which works just fine: (simplified template): <...
1 vote
1 answer
37 views

INSTALLATION ENCOUNTER "WHITE SCREEN OF DEATH"

Why do some Magento 2 installations encounter "white screen of death" errors, where the site appears blank with no error messages displayed?strong text
5 votes
1 answer
47 views

causing error and conflicts with modifications

How can I troubleshoot issues with Magento 2 customizations and modifications that are causing errors or conflicts so please s0lve the error
3 votes
2 answers
70 views

How can I enable developer mode in Magento 2? [duplicate]

How to enable developer mode function in magento2 please check the solution for me
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 ...
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/...
0 votes
2 answers
369 views

<arguments> approach not overriding the template file

I wanted to override vendor/magento/module-sales/view/adminhtml/templates/items/column/name.phtml template. And created new layout xml update as: File: app/code/MagePsycho/CustomInvoice/view/...
1 vote
1 answer
2k views

Magento 2 Credit Memos : Template override doesn't work after clicking "Update Qty's" button

I am creating a custom module to simplify the Credit Memo creation for admin users. One of the features is hiding the "Return to Stock" column. I have overwritten 2 files for this: vendor/magento/...
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\...
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....
0 votes
1 answer
27 views

Block that doesn't explicitly declare template?

I recently followed a tutorial to add a custom fee to the checkout summary of my Magento store and after getting everything working, I realized that the block I created didn't need to have an ...
4 votes
5 answers
5k views

Magento 2 - How to auto open cart items on checkout page?

I'm using a mostly stock Magento 2 checkout_index_index layout (checkout page), I was wondering if anyone knew how to default the order summary collapsible to be open on page load. It isn't clear ...
37 votes
10 answers
37k views

Where is Template Path Hints in Magento 2?

Just started playing about with Magento 2. Can anyone tell me where I can find the "Template Path Hints" option that used to be in System > Configuration > Developer > Debug?
0 votes
0 answers
24 views

Magento 2 adding a block on top of add to cart and quantity for configurable products

I am trying to add a custom block on top of the quantity and add-to-cart on the product details page for all products by making changes to catalog_product_view.xml. I am able to achieve this using ...
0 votes
3 answers
2k views

Magento 2 - Get name of templates block from .phtml file

Is it possible to get the block name of the current template? For example I added a block to catalog_product_view.xml: <block class="Magento\Contact\Block\ContactForm" name="...
0 votes
1 answer
45 views

The way to overwrite list.phtml

A bit new to Magento but need to do next thing: Hierarchial catalog(HC) [Category > Subcategory('s) > Products] I found on the web that i can rewrite app/design/frontend/Vendor/theme/...
3 votes
1 answer
2k 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. ...
1 vote
3 answers
4k views

How to remove Social Media Icons from Product View page?

I am looking everywhere in the Admin panel and in the file manager. I can not find where to remove the social media icons from under the "Add to Cart" button. Can someone please point me in the ...
0 votes
0 answers
16 views

New Order Confirmation Template - move order_totals to bottom of page

I created a new email template for New Order Confirmation Template , which uses the {{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}} ...
2 votes
5 answers
2k views

Can I and should I call Block methods from its' View Model?

I have a template and should write some logic. I have made a view model and I'm calling it from a template. Should I call block methods from the view model? And if so, how can I do it?
1 vote
2 answers
2k views

Magento2 - Override Template order summary in sales email order

I have the template that is using the following to render order summary {{layout handle="sales_email_order_items" order=$order area="frontend"}} it is taking the code from the following template ...
0 votes
0 answers
62 views

how to pass javascript variable to php in template

I am creating admin form using template I have multiple select dropdown. I want to filter dropdown based on the value of other but problem is how i can assign the javascript value to php variable so ...
0 votes
2 answers
418 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
2 answers
39 views

Unable to display product name in catalog_product_view.xml

I am new at Magento, I would like to render the product name to catalog_product_view.xml (product page) from a custom phtml but it didn't work. May I know where did I go wrong? Thanks! app/code/...
3 votes
1 answer
3k views

Magento best practices: try / catch in templates

I have a question about best practices in templates. Let's assume I am editing the product details template file. I would like to call a method in the product model which can raise an exception. ...
0 votes
2 answers
31 views

Custom Page Module with existing theme template?

Is there a way to use a template from a third-party theme, that is already installed, with a newly created custom page module?
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 ...
0 votes
0 answers
10 views

Custom entity wysiwig doesn't replace variable

Field <field name="description"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"&...
1 vote
0 answers
143 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 ...

1
2 3 4 5
29