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
0answers
33 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
1k 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
93 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
53 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?
3
votes
2answers
33 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
190 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
208 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
40 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
199 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
144 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
8k 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
1k 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
44 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:
1
vote
2answers
188 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
4k 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/...
0
votes
1answer
25 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 ...
11
votes
4answers
9k 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
146 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
90 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 ...
3
votes
1answer
123 views

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

Newsletter (/newsletter/manage/ ) management generates blank page
0
votes
2answers
294 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
66 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
98 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
60 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 ...
2
votes
3answers
4k views

Magento 2 override minicart.phtml in custom module

I'm trying to override minicart.phtml file from Magento2\vendor\magento\module-checkout\view\frontend\templates\cart\minicart.phtml to my custom module Magento2\vendor\XXXX\YYYY\view\frontend\...
0
votes
3answers
894 views

How to re-submit form data in custom module?

I want to get post data in phtml . In case form data not save then show error and already fill form . <form class="trail-register-form" action="<?php echo htmlspecialchars($this->...
0
votes
0answers
48 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
0answers
37 views

Magento 2: Get store information in frontend files

I'm completely new (like 3 days in) to Magento Development so I apologise in advance if i'm asking a silly question! I've really struggled to find a good magento course online so now i'm at the stage ...
0
votes
2answers
687 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\...
3
votes
1answer
98 views

Magento 2: Ajax without effect

My problem is as follow, my script except ajax in working (no problem with giving value or console.log) but my ajax doesn't give me the result expected (remove hidden class and fill a drop list with ...
0
votes
1answer
661 views

Magento 2 : Script from Javascript is load but doesn't execute

Sorry I have kind of strange problem with Magento 2 I am not use to Magento I made a script which should be executed in the Ulimo template in the header of my website, on the network console the ...
0
votes
1answer
174 views

Magento - Changing the place of block to another page

I am using MA2 Juno theme and trying to move default checkout block to another place, like this: Before: After: For this I figured out that I have to move this <?php echo $this->getChildHtml(...
0
votes
1answer
153 views

Magento 2 limit max length in Qty field

I wan't to know how to set a max length for the Qty field that is when you click a product (I guess it's product View) I tried to override the following template and set maxlength = "4" but did not ...
0
votes
1answer
24 views

Error setting an adminhtml from a frontend path

I'm using a third-party which set an appendPaymentBlock Observer method <adminhtml> <events> <payment_info_block_prepare_specific_information> <observers&...
0
votes
0answers
45 views

Changes made in web template do not show on frontend?

I am using Magento 2.2.3 and I am modifying a template from a custom extension. That path to the template is app/code/Foo/Osc/view/frontend/web/template/container/address/billing/create.html I am ...
0
votes
1answer
41 views

Magento 2 add cart contents to email termplate

Is there a way to add the contents of the users cart to an email template? I would like to do this for the abandoned cart email and would rather not use a 3rd party extension.
2
votes
1answer
1k views

Image Zoom Dimensions

AFAIU Magento zoom spot size is defined via CSS (square by default). It takes a large product image and fits it in by the short side and then allows to zoom it to actual size. So for example if I ...
2
votes
1answer
2k views

Output all product attribute values on catalog page

On the catalog grid page, I want to output all filterable attribute values for each product. For example: If the price is filterable in the layered navigation, the attribute value associated with the ...
1
vote
1answer
172 views

Show currency switcher in custom template file Magento2

I am trying to show currency switcher in custom template file. I referred some links and found for magento1. Where they used below code in the template files. <?php echo $this->getLayout()-...
0
votes
2answers
64 views

M1 How to know what contents corresponding to layout / block / template?

Currently, I don't know how to find the layout of the manage customer page (Customers > Manage Customer). Generally, how can I find the block/layout/template/controller of a specific page? Thank ...
0
votes
2answers
1k views

Magento 2: Translation is not working in html template using data-bind

I have inserted the string to translate into the app/i18n/lg_lG.csv file. I run the command to deploy static files, clean cache, but the string is not translated. The string is located in this file: ...
1
vote
2answers
142 views

Magento 2 setTemplate and add content to phtml template

How to add bare HTML to a block e.g: $block = $result->getLayout()->getBlock('category.description'); $block->setTemplate('Vendor_Module::myTemplate/blank.phtml') ->toHtml('<p>My ...
1
vote
1answer
833 views

Override Magento 2 Adminhtml Template File

I'm trying to override this file: /vendor/magento/module-import-export/view/adminhtml/templates/export/form/filter/after.phtml This template file has been declared in: /vendor/magento/module-...
1
vote
3answers
669 views

Magento 2 - Override phtml files not working

I am working on Magento 2 and I override few PHTML files from vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml to app/design/frontend/vendor/module/Magento_Catalog/...
0
votes
0answers
50 views

Error 503 when preview a template email with header_template or footer_template config_path

When I try to show the preview of my newsletter template I get error 503: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or ...
0
votes
1answer
27 views

One storeview error to many redirect

We have a multistore in multilanguage and as test we set one to connect the media and static url through static.domain.com to a CDN but that is not working. But now the template for that storeview ...
0
votes
1answer
96 views

Magento 2 include template with form in CMS Block

I have been struggling trying to put a template functionally working inside a CMS Block. When I put this code inside my CMS block the template is correctly implemented {{block class="Experius\...
3
votes
1answer
279 views

Magento 2.3.0 - Can't set to production mode

I want to put my store on production mode, I use this command on ssh: php bin/magento deploy:mode:set production And I have this output: Enabling maintenance mode Config "dev/debug/debug_logging = ...
3
votes
3answers
1k views

How to get the pub/media Url in Email Templates Magento2

Can anyone help me how to include Pub/medial url in email templates in magento2. Thanks

1
3 4
5
6 7
28