Questions tagged [layout]

Denotes the xml files used to define the block hierarchy which eventually renders the template files.

622 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
1 answer
1k views

Magento 2 - Move the afterMethods item (Discount and Gift Card Code) to the Order Summary sidebar

I would like to move the afterMethods xml item which contains the Discount Code and Gift Card code under the billing-step in the module-checkout/view/frontend/web/checkout_index_index.xml so that it ...
user avatar
6 votes
0 answers
562 views

How to ignore(remove) <update handle="name" added in other layout

module-sales/view/frontend/layout/sales_order_view.xml has following code: <update handle="sales_order_info_links"/> Is there any pretty way to remove such updates? p.s. I know about ...
user avatar
  • 3,768
5 votes
0 answers
1k views

Move Elements on Magento 2 Product Page

I have the Porto Theme installed on my website using Magento 2.2.5. I would like to move a couple of Elements on the Product page but only for specific products. I have attached a screenshot of how ...
user avatar
5 votes
4 answers
4k views

$block->getViewModel() returning NULL

I am overriding the layout and adding ViewModel in that layout but when I try to fetch the ViewModel getting below error PHP Fatal error: Uncaught Error: Call to a member function getCodes() on ...
user avatar
  • 630
5 votes
0 answers
171 views

Remove Trailing Slash from Footer Links added via addLink

I have added several links in my layout.xml like this: <action method="addLink" translate="label title"> <label>XYZ</label> <url>xyz</url> <title>...
user avatar
  • 712
5 votes
0 answers
676 views

Magento 2: How to override cacheable="false" in layout in your own theme

We use a third party extension wich lets us add bundles with specific discounts to product pages. The problem is that they added a default.xml with the following code: <block class="Magedelight\...
user avatar
5 votes
0 answers
1k views

Magento 2 - Move Category Page Toolbar/Sorting Options Above Both Columns

What I'm trying to do is move the toolbar/sorting options on the category page above the left column and right column so it spans the full width of my content area. I'm trying everything and nothing ...
user avatar
  • 1,451
5 votes
1 answer
1k views

Magento 2 - assign custom email template to specific payment method

What is the proper way to assign custom email template to specific payment method upon creating an order? For example: When choosing a Bank transfer payment method on the checkout it should send ...
user avatar
  • 51
5 votes
0 answers
2k views

After assign custom home page layout getting blank page in Magento2

Magento2 by default provide 1column, 2columns-left, 2columns-right, 3columns layout and I want to set new layout for my Homepage so I do below process. First copy 2 files from this path 1. ...
user avatar
  • 1,635
5 votes
1 answer
759 views

How can i remove update handle in magento 2

I have removed blocks from xml file using <referenceBlock name="page.top" remove="true" /> but how can i remove <update handle="customer_account"/> from the layout file.
user avatar
  • 1,128
5 votes
2 answers
1k views

Custom page layout not working

Im going crazy here. Can't get this to work. I'd like to make a custom page layout like the 1column, 2columns-left etc. I've searched and read multiple tutorials all doing the same. Nothing works ...
user avatar
4 votes
0 answers
181 views

Call a Shipping field from front end to backend Magento 2 Layout processor

I have added a custom delivery date option in shipping method on front end using layout processor and it is showing and working fine. Is there any way to merge or call the same method in backend order ...
user avatar
4 votes
0 answers
87 views

Product's "Layout Update XML" code disappears from the site every 24 hours

I have some products with "Layout Update XML" Design updates (simple XML pointing to a template file; very basic and in the correct format). Every 24 hours after a cache flush, the code vanishes from ...
user avatar
  • 316
4 votes
1 answer
2k views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
user avatar
  • 409
4 votes
2 answers
5k views

Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login

After successful login, Luma theme shows customer account details in dropdown on header as seen in below image I need to replicate the same in our custom theme which has Blank as its parent. Vendor/...
user avatar
4 votes
0 answers
278 views

Whats the main use of item name="types" in magento 2 checkout xml file?

In checkout_index_index.xml file, What's the use of item name="types" in checkout page? Also item name with form.input is not defined anywhere in checkout module. <argument name="jsLayout" xsi:...
user avatar
4 votes
4 answers
2k views

How to call module block after header?

I have a module layout file below <default> <block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" ...
user avatar
4 votes
1 answer
327 views

Magento 2: How to create custom layout instructions to match a custom product page layout?

I am trying to work on a product subscriptions page which is very different in function from a standard product page. I have created my new Magento_Theme/page_layout/subscription.xml I set Magento 2 ...
user avatar
4 votes
1 answer
700 views

How to locate culprit for "Please correct the XML data and try again" error

Getting the following error on the cart page of Magento 2, checkout_cart_index. It's a code base with no version control and this issue is present even when I'm using the default Luma theme. I've run ...
user avatar
  • 6,770
4 votes
1 answer
1k views

XML - Cannot move product.info.review after product.info.overview

I'm trying to do the following, moving product.info.review after product.info.overview (short description) I've used the following code, but it is not working: <move element="product.info.review"...
user avatar
4 votes
1 answer
2k views

magento2 -custom layout file not loading

i have followed the below link in order to get check if our custom layout xml file is loaded or not using the event: layout_generate_blocks_after In the log file i just get: 2016-06-29T11:07:40+00:...
user avatar
  • 2,559
4 votes
1 answer
978 views

Pdf xml in Magento 2?

When developing a payment fee, I want to add a surcharge fee to Pdf. I found the pdf.xml config. However, I don't know how it works. Can anyone help me to explain the config pdf xml. vendor/magento/...
user avatar
4 votes
2 answers
1k views

Not displaying breadcrumbs in Contacts page

In my site, the breadcrumbs are not displaying on the Contacts page. I have added the code for breadcrumbs in contacts.xml (given below), but still not working. <layout version="0.1.0"> <...
user avatar
  • 617
3 votes
0 answers
187 views

Admin side when Create Credit memo give error like No such entity with cartId = xxx in magento 2

when I am creating a new credit memo error generate like No such entity with cartId = xxx .so why this error generate anyone has a solution then give me. also, remove generated and var/*. Thank You
user avatar
3 votes
0 answers
95 views

Production mode doesnt load any content for custom module

I have created a custom module in Magento 2. In developer mode it is working well, however same module does not show any content in the production mode of Magento its show only white screen. There is ...
user avatar
  • 630
3 votes
0 answers
27 views

How to organize layouts?

I'm on the product page and in my layout i created a block to render on the product informations, on the upsell product informations and on the related product informations but it doesn't works. The ...
user avatar
  • 43
3 votes
1 answer
93 views

Custom Theme XML Files Changes 2.2 to 2.3

Does anybody know if there have been changes to the way XML files from custom themes are included in Version 2.3? I have a very simple XML file to modify the Magento Advanced Search page. The custom ...
user avatar
  • 421
3 votes
1 answer
1k views

Magento 2 Init script after page load

Is there any option to init (text/x-magento-init) script after page load? Example, I am working on a simple quickview feature and my controller returns my a layout - phtml file - with rendered html ...
user avatar
  • 369
3 votes
0 answers
728 views

Magento2: How to get current URL in XML file?

I am looking for current URL in XML. Need to set canonical tag. <head> <link rel="canonical" src="I want currentUrl here" src_type="url"/> </head>
user avatar
  • 1,779
3 votes
0 answers
169 views

Show all products with layered navigation Magento 2

Now, to be able to show all the products, I have to make 1 main parent category to contain all the product category, but I think it's not the right thing to do. Is there a page to show all the ...
user avatar
  • 1,474
3 votes
0 answers
40 views

How to insert create customer account form layout to a block as a widget

I want to insert customer_account_create.xml content which containing the create customer account form into one of my block that I created from backend > content > blocks > add new block Is there ...
user avatar
3 votes
1 answer
124 views

Check if block is called in phtml file

Is it possible to check in default.phtml file (app\design\frontend\MyNAMESpace\MY_THEME\Magento_Catalog\templates\product\price\amount\default.phtml) that catalog.product.related (block ) is loaded or ...
user avatar
  • 4,657
3 votes
2 answers
3k views

Magento 2: How to call Widget programatically?

I have created widget Type: CMS Static Block Theme: My Theme Display on: All Pages Container: CMS Footer Links Template: CMS Static Block Default Template Widget Options: Block (My selected block) ...
user avatar
  • 9,473
3 votes
2 answers
1k views

How to override layout file, which is already override by other theme - layout\override\base\somel_ayout.xml

How to override layout file, which is already override by other theme. For example, we have existing theme. app\design\frontend\<Vendor>\<themeone>\Module_Vendor\layout\override\base\...
user avatar
3 votes
3 answers
1k views

Magento 2 : Remove Top Links When Customer Not Logged In

I would like to remove My Account link from top links, when customer is not logged in. How do I achieve it via XML layout files?
user avatar
  • 1,443
3 votes
1 answer
867 views

Block not showing after layout update

Considering this layout update XML: <?xml version="1.0"?> <layout version="0.0.1"> <checkout_cart_index> <reference name="methods"> <block type="...
user avatar
  • 143
3 votes
0 answers
618 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 ...
user avatar
  • 1,451
3 votes
1 answer
667 views

Product image disappears on product page when using a custom page layout

I'm creating a custom theme on Magento 2.1. I create a custom layout for the product page in app/design/frontend/<theme_name>/base/Magento_Catalog/layout/catalog_product_view.xml, here it is: &...
user avatar
  • 270
3 votes
0 answers
2k views

Magento 2: Hook into price display on category page

I want to add custom notices directly behind every price on product detail and category pages. On product detail page this works fine with layout.xml: <referenceContainer name="product.info.price"&...
user avatar
  • 251
3 votes
2 answers
2k views

Magento Container not working in custom layout

I have created a custom XML layout page that I will be using for my home page. Right now it is a clone of the normal 1column.xml layout, and I'm trying to add a container for an image slider. Here is ...
user avatar
  • 31
3 votes
0 answers
1k views

Magento 1.9 add new products to homepage with Layout update XML only

I manage to show 4 'new products' on my homepage. In my Homepage > Design > Layout update XML i put the following code: <reference name="content"> <block type="catalog/...
user avatar
  • 483
2 votes
0 answers
118 views

Magento 2 - uiComponent doesnt paginate properly neither export

I am trying to make a grid on the admin panel with a custom collection (custom dataSource). The problem I am facing is that it doesnt paginate properly (all records are in one page but the pagination ...
user avatar
2 votes
0 answers
130 views

How can I show related products in magento 1.9

I am using Magento 1.9 with porto theme. i want to show related product in product page . I searched a lot on google , stack platform & in magento community. i tried all possible ways to add ...
user avatar
2 votes
0 answers
104 views

How to move the block under the sidebar in the payment step of checkout

I have a block that I display on the checkout at the bottom of the page <referenceContainer name="page.wrapper"> <block class="Magento\Framework\View\Element\Template" name="...
user avatar
2 votes
0 answers
244 views

Use knockoutjs in Ui component of Admin form

I have created a form using UI component on Admin side. If i want to add a .phtml then i can add the file this way. <htmlContent name="driven_form_design"> <block class="Magento\Backend\...
user avatar
  • 1,128
2 votes
0 answers
171 views

Missing column in Shopping Cart Table in magento 2

Here is my snapshot: The row of "Angel Light Running Short" does not having column stock. And then I tried to empty my app/code/Company/ModuleName/view/frontend/templates/cart/item/default.phtml ...
user avatar
2 votes
0 answers
33 views

Magento2: Minicart issue on Custom layout

I am using a custom layout for the category page. Here is my code: app/code/Custom/Module/view/frontend/page_layout/equipment.xml <?xml version="1.0"?> <layout xmlns:xsi="http://www....
user avatar
  • 1,779
2 votes
1 answer
568 views

Override Magento 2 checkout.cart.methods.onepage.bottom proceed to checkout button Block and template file

I see below configuration in Magento 2 layout at vendor\magento\module-checkout\view\frontend\layout\checkout_cart_index.xml. I created custom module and copied existing Link Block and link.phtml to ...
user avatar
  • 335

1
2 3 4 5
13