We’re rewarding the question askers & reputations are being recalculated! Read more.

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
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
19 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
28 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
37 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
34 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
10 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
4answers
33 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
8 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
30 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
79 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
35 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
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 ...
0
votes
2answers
28 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 ...
0
votes
1answer
21 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 ...
0
votes
2answers
44 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
16 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
21 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
31 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
39 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 ...
0
votes
0answers
26 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
2answers
45 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\...
0
votes
0answers
35 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 ...
3
votes
1answer
45 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
55 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
0answers
10 views

Magento 2 - I have removed duplicated tables from database and part of home page is not showing

Magento 2.2.7 In DB I have found that I have a duplicated database. My database tables have prefix dev_ while there were identical tables without prefix that was probably left after some "test" ...
0
votes
1answer
19 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
17 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
26 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
20 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.
0
votes
0answers
30 views

Magento 2 insert Custom variables in Order Update Email Template {{var custom.customattribute}}

Does anyone know how I can manage to make variable to insert a specific data field from a custom checkout field in the email templates for Order update? I am using the module One Step Checkout for ...
0
votes
1answer
24 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. <...
0
votes
0answers
21 views

Delivery Time is always displayed in “Ultimo”- template

While using "Ultimo" template can´t switch of delivery time attribute. When enabling delivery time attribute, it i shown twice in product view. When the attribute is disabled, delivery time is no more ...
1
vote
1answer
27 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
100 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: ...
0
votes
2answers
36 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
1answer
92 views

Magento 2 : how to add content on customer dashboard

On customer dashboard you see this https://github.com/magento/magento2/blob/ddf42caaf25311f10b23b95a92746f99943e045e/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml#L23 ...
1
vote
2answers
63 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
3answers
105 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
24 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
60 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\...
2
votes
3answers
114 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
3
votes
1answer
86 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 = ...
0
votes
1answer
31 views

restore the default checkout in magento 2.3 [duplicate]

I have a disaster in the template of a checkout, it is really bad!. I never used Magento but now I need to restore the default checkout layout/html/template of a web. I no have backups of changes and ...
0
votes
1answer
33 views

How to restore the default checkout template?

I never use Magento but, a friend uses it and a dev. broke their checkout page, how I can restore the TEMPLATE of the checkout to default? I don't see a backup of any of the files, and I no have clue ...