All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

Magento 2 - how to reference a template of my theme in a layout file?

I have this file app\design\frontend\company\mytheme\web\templates\header\foobar.phtml How can I reference it in a layout file e.g. in app\design\frontend\company\mytheme\Magento_Theme\layout\...
0
votes
0answers
30 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
1answer
37 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
4answers
39 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
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/...
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:
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
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
2answers
37 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 ...
1
vote
2answers
70 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 ...
0
votes
1answer
34 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
35 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 ...
0
votes
1answer
20 views

Magento 2 - Get all team members on a page

I begin in Magento development and I try to do something but I don't know how to start. I want to display on a "about us" company page all team members of a company, for example in WordPress we have ...
0
votes
1answer
89 views

How to render a block/template after page load

I need to know whether we can render a block or a phtml template file after the page load. I have added the block and template file in the layout file and it works fine. But i dont want that data to ...
0
votes
1answer
25 views

Add content of static block as new tab to product detail page

I created 3 static blocks with just a random headline for now, where I want to add html content later. the ids of the blocks are: warranty instructions certificates I then created 3 .phtml files ...
0
votes
3answers
111 views

Layout - Pass variables from parent to child

How can I access variables defined in the parent template inside a child template? Example -> I added a new block with name product.info.grouped.news_flag as child of the block with name product.info....
0
votes
1answer
183 views

How to use different page layouts depends on base layout specified?

I have to use different page layouts (<page>) depends on base layout (<layout>) specified for a product. For example, if I select a layout in product's 'Design' menu with the name ...
1
vote
2answers
395 views

Adding contents to default customer sign up / create account page - Magento 2

I would like to add a banner image and some contents to default create customer account page at www.domain.com/customer/account/create/, how do i do it? Or Can I add a CMS Page or static block to it?
2
votes
0answers
26 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 ...
0
votes
1answer
421 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 ...
1
vote
1answer
148 views

How add a country selector in the header section?

I need add a country selector in the header section, next to the currency selector. How is the right way to do this? Edit: I realized that there was not much information in my question, so it was ...
0
votes
0answers
26 views

Install layouts and templates from the theme divante

I installed the theme https://github.com/DivanteLtd/magento2-rapid-theme, the theme got up, everything is in order, I don’t understand how to set the main page to make it as an example. The topic has ...
0
votes
1answer
159 views

Show Separate product detail page based on attribute value in Magento 2

Shall we load separate product detail page based on the product attribute value in magento2 ? I have created the attribute product called "type_of_product" If this attribute value is "Test 2", I ...
0
votes
1answer
70 views

override wysiwyg_images.files

I try to override Magento_Cms::browser/content/files.phtml but when i test , the block is dont display , and i dont know why i have the next extructure <Vendor>_<Module> ├── <Stuff&...
1
vote
1answer
992 views

Magento 2.2.6 - Change the product name title

how I can change products name attribute. I create a new attribute second_name and I assigned to all products, now I want this attribute to replace the default name attribute. I need to change this on ...
1
vote
2answers
168 views

Template doesn't load on custom theme

I have a problem with loading a new template on payment methods section on checkout, but only on my custom theme. I have created a custom module that adds a new block with template in the above ...
0
votes
1answer
296 views

Magento2: How to move header-bottom to top

I am trying to move the header to the top of the page. I'm use in default.xml <move element="header-bottom" destination="header-top" as="new_alias" before="header-middle"/> But without a ...
0
votes
0answers
39 views

Magento 2 add Block Template in php (not XML)

In Magento 2 one can do with XML : <referenceContainer name="content.bottom"> <block class="My\Module\Block\Index\Index" name="my.block" template="My_Module::test.phtml" /> </...
0
votes
1answer
398 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
1answer
294 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 ...
0
votes
1answer
39 views

Wrong template location after overwrite

I have overwritten the _beforeToHtml() method in the class Magento\CatalogWidget\Block\Product\ProductsList. After doing this, I received the following error: Invalid template file: 'product/widget/...
1
vote
2answers
179 views

Magento 1 - action method setTemplate is ignored

I try to overwrite a template file with another one which I provide with my extension. I also noticed that other action methods are working just fine, e.g. <action method='addLink'... successfully ...
0
votes
1answer
32 views

How to add lists brand under footer

I want to add brands list under footer: Can anyone help?
1
vote
1answer
581 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
2answers
138 views

Blank Page with Front End Template in Controller

I have a controller that needs to display text, but I get a blank page. Here is what I have: Controller/Index/Index.php namespace Veratad\AgeVerification\Controller\Index; use Magento\...
0
votes
1answer
65 views

How to set type when using setTemplate in action

I am rewriting the template of newsletter_manage_index like this: <newsletter_manage_index> <reference name="customer_newsletter"> <action method="setTemplate"> ...
1
vote
2answers
51 views

How to use block from module on CMS page?

I have a block class called Fekete_Newsletter2Go_Block_Form. <?php class Fekete_Newsletter2Go_Block_Form extends Mage_Core_Block_Template { private $n2g; private $session; private $...
0
votes
2answers
80 views

Magento Override frontend template in custom module file

I want to override the contact page frontend from my module file. To override the frontend template of contact form, i have created module and in that module i have created layout file mymodule.xml ...
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 ...
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\...
1
vote
1answer
374 views

How to overwrite UI Component XHTML files in a theme - Recently Viewed

How can I override vendor/magento/module-ui/view/base/ui_component/templates/listing/default.xhtml in a theme? In this instance it's for the recently viewed products widget. This is added here - ...
0
votes
1answer
323 views

Magento 2 : Getting CMS Custom Field in Template

I've managed to successfully add a new image upload field to the CMS edit form. I have it saving to the media folder, etc, so everything works in that area, but I'm having trouble conceptualized how ...
0
votes
2answers
1k views

Magento 2 - page.main.title below content

the page main title is below the content. You can see the problem in the picture. /magento/vendor/magento/module-theme/view/frontend/templates/html/title.phtml Magento\Theme\Block\Html\Title ...
1
vote
1answer
33 views

Adding a preview product section on the product page

I am fairly new to the Magento platform so excuse my lack of knowledge! I'm working on a Magento 2 project. I need to add a preview section for my products. Ideally, it would be between the product-...
0
votes
1answer
28 views

Which of these Magento statements is correct?

I am doing some M2 fundamentals online training, the system is telling me that one of these answers is incorrect... Question 1: Which of these directives will assign a template to a block in a layout ...
0
votes
1answer
258 views

How to disable slider only in home page?

I have an slider in home page and this slider show 5 product in every line everything all right but, when a user's page is small the number of products decreases and the slide starts to move. How can ...
0
votes
1answer
505 views

Layout: moving the stock element in between the qty and addtocart

My want is to move the "In stock" part in between the "Qty" and "Add to Cart" button; However this is made hard by the fact that these two components are in the same template and not wrapped in a ...
0
votes
0answers
57 views

Find referenceContainer in Magento 2.1 module

This is my first attempt to write a Module for Magento 2.1 I have read the documentation for referenceContainer that is not very helpful, I would like to know how can I access and apply my change in ...
1
vote
0answers
276 views

Change default Magento 2 theme to use a boxed layout instead of full width?

Change default Magento 2 theme to use a boxed layout instead of full width? I'd like to change my Magento 2 theme to use a boxed layout instead of a full layout. I've already started customizing the ...
0
votes
2answers
1k views

Can you set a template for every action within a controller?

For instance I have a module My/Module (my_module) with a controller RenderController.php which has an action layoutAction. Is there a way that I can set a template for every action within the ...