Questions tagged [layout]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
18 views

Hide customer navigation links based on user group

I would like to hide link in user account customer_account.xml based on role they are in. Let say we have group B2B and i want to hide block customer-account-navigation-product-reviews-link. To remove ...
1
vote
0answers
29 views

Unable to change the catalog_category_view.xml layout to 1 column in Magento2

I would like to change the catalog_category_view.xml layout from 2columns-left to 1 column in the custom theme followed below steps. Here is the file in the custom theme: app/design/frontend/...
0
votes
1answer
13 views

Magento 2 which of the elements automatically render their children in layout Xml?

Which two elements automatically render their children in Xml? <block class=”\Magento\Framework\View\Element\AbstractBlock” name=”shop.info.details”/> <block class=”\Magento\Framework\View\...
0
votes
0answers
5 views

How to move “associated products” from a grouped product to a new tab?

I would like to know how to move the Associated Products that are inside my grouped product to a brand new tab, which would be "Select your products":
0
votes
0answers
14 views

Breadcrum issue after embeding advance search on home page:magento2

I have moved the advance search form on home page with the custom template as: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../....
0
votes
1answer
45 views

Override sales_order_grid.xml to remove print options from mass action drop down in sales orders

Hello everyone, I'm trying to override the file sales_order_grid.xml to remove some print options from the mass action drop down in sales orders. I'm using Magento 2.4.2. The original file is located ...
0
votes
0answers
13 views

Magento 2 - Change load order of custom page layout

I created a new page layout, but I noticed that it does not get loaded last and it gets overridden from other layouts. Is there a way to change the load order so that my custom page layout gets loaded ...
0
votes
2answers
29 views

Magento 2 - Custom page layout not working properly

I have some big grouped products (with sku: montagekonsole and montageschiene). I need to change the layout for both. First I just created custom sku handles for each product like this: THEME/...
0
votes
1answer
25 views

How can I move 2 blocks into a div?

I'm trying to move the category image and description into a single div. They're both in the catalog module under view/frontend/layout/catalog_category_view.xml <referenceContainer name="...
0
votes
1answer
34 views

How to add country code dynamically in telephone field on Checkout in Magento 2

I want to develop custom module that is used for adding country code field before telephone field on checkout page in magento 2.3.4.
0
votes
1answer
27 views

Magento 2 - Custom page layout destroys view

I added a new page layout which inherits from the page layout 1column: THEME\Magento_Theme\layouts.xml <?xml version="1.0"?> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
1answer
19 views

adding tag to a specific page

hello everyone i have added a specific tag to all page of my website , but I want to add it to just the home page , can i achieve that ? i have added the meta tag like below, but it appears on all ...
0
votes
0answers
14 views

Create a custom tab layout for admin page

I'm trying to create an admin page separated into tabs that displays some custom phtml. I thought about using a ui_component form, but this requires a datasource which I don't have/need for this page. ...
0
votes
0answers
16 views

How to defer CSS via layout xml?

I'm trying to defer a CSS file through default_head_blocks.xml. After reading through as much as possible on here - and across the internet - I came across an answer suggesting to add defer="...
0
votes
1answer
46 views

Page keeps blank when creating a custom form. Controller and routes are set up correctly

I was following this but unfortunately, the form does not show up. Here is my complete module: Mageplaze/HelloWorld/etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http:...
0
votes
1answer
19 views

Get target url in layout before observer

I'm inside an observer <event name="layout_load_before"> <observer name="add_robot" instance="FranceTombale\Robot\Observer\NoindexfollowOnProduct" /> </...
0
votes
0answers
15 views

How to use 2 models in layout folder in xml that should show in inside view show.phtml file. Please tell how the controller is linked with block

How to use 2 models in layout folder in xml that should show in inside view show.phtml file. Please tell how the controller is linked with block. And how a layout file is linked with the controller ...
0
votes
3answers
26 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
2answers
36 views

Magento 2 how to show custom block before product.info.details and after media

Magento 2.3.5-p2 how to show custom block before product.info.details and after media ? <div class="product-info-main"></div> <div class="product media"></div&...
1
vote
1answer
36 views

Custom layout update not shown for CMS page

I've made a custom layout update file according to the instruction (https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/xml-manage.html) in 2.4.1, but the option is not displayed for a ...
0
votes
2answers
65 views

After update to 2.4.0 view invoice in backend breaks page (layout will not load)

i have a problem since we have updated our Magento from 2.3.5 to 2.4.0. Here is the problem: We will open the invoice view in backend. So we go to: ->Sales->orders->select an order (my order: ...
0
votes
1answer
13 views

Magento two cannot update sales_order_create_load_block_items.xml

I need to overwrite Magento_Sales::order/create/items/grid.phtml in sales_order_create_load_block_items.xml created My_Module/view/adminhtml/sales_order_create_load_block_items.xml <?xml ...
0
votes
0answers
20 views

Reposition delete button magento2.4

How to reposition this button on Order Summary.
0
votes
2answers
38 views

How to divide the product view into 3 columns in magento 2?

I want to divide the product view into 3 corresponding columns, could anyone please help me solve this problem. thanks
1
vote
1answer
32 views

Diiference between Page Factory and Result Page Factory in Magento

What is the use of PageFactory and ResultPageFactory in Magento? Major difference between both and for what both are used for
0
votes
1answer
27 views

How to set phtml file in specific area Magento 1.9 using an Observer

I'm trying to set/ display a template file instead of the default messaging in Magento 1.9 using an Observer when the checkout loads but I cannot get the phtml file to show up and I don't know why?? ...
0
votes
1answer
125 views

Magento 2 : Override email/shipment/track.phtml in module

Is their any way we can override email/shipment/track.phtml ? in module ? created layout file view/frontend/layout/sales_email_order_shipment_track.xml <?xml version="1.0"?> <page ...
0
votes
1answer
16 views

Magento 2: full page Mechanism

I have a question. If full page is enable and If I do not metioned below code in my block declareation layout xml file <arguments> <argument name="cache_lifetime" xsi:type="...
0
votes
0answers
16 views

Magento 2 how to use custom ui component form layout in another layout?

I have a custom checkout step, and then I have another custom layout with the custom form container and static form with ui components. I also have 2 JS files separated, one for creating the extra ...
0
votes
2answers
35 views

How to override items.phtml in module ? (Magento 2)

I am trying to override module-sales/view/frontend/templates/email/creditmemo/items.phtml file but no changes appearing. Is their any way i can override it in my module ? Thankyou
0
votes
1answer
18 views

Changing the layout & design for a specific set of products

On 3 of my products I wanted to change the look & feel along with the layout As an example, I want to move the product title so I have created a new child theme like below /app/design/frontend/[...
0
votes
1answer
65 views

Display attribute value as a Product Tab label in Magento 2

I added a new product Tab which displays the custom attribute value. app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml <referenceBlock name="product.info.details"> ...
0
votes
0answers
13 views

How do I “force” a theme layout of 1 column for a single page?

we edited the xml and now the sidebar does not show but we need to, for that page, to make the theme be 1 column and now 2 as it is right now. It's from a module so we can't edit the layout on the ...
0
votes
2answers
61 views

Magento 2 - remove block if page layout is XY

I need to remove a block named "header_top_content" by using a layout xml file, but only on CMS sites with page layout set to "empty". Is this possible via layout or not? I tried ...
0
votes
0answers
12 views

Sort By option not working properly when using ascending or descending button

So the problem is as follows: I have the Sort By option set to "Price", but once i try to change the order from descending to ascending or vice versa, the Sort By" turns back to ...
0
votes
0answers
13 views

How to create a custom product attribute where i can upload as many PDFs as needed, and upload the thing as a whole?

I need to complete a task which i have been struggling with since last week. If i "Go to Seller Store" and then into editing a product (both a new product or one that is already uploaded), ...
0
votes
1answer
20 views

why I can't set a custom template for street field in checkout shipping step via checkout_index_index.xml

Could you explain me please why I can't set custom template for 'Street' fields group via checkout_index_index.xml. My code below: <item name="street" xsi:type="array"> &...
0
votes
0answers
24 views

Magento 2 - How to reorder UiComponents?

I have a really simple task, but I research for hours now and still cant figure it out. I created a checkbox in the checkout like this: app\design\frontend\company\fresh\Amasty_Checkout\layout\...
0
votes
0answers
7 views

Top link not moving to header - Element not moving to porto_header

I'm trying to move my customer account dropdown from the header.links to the header. The element I'm trying to move is called customer. It's in the file app/design/frontend/Smartwave/porto/...
0
votes
1answer
22 views

Change position of elements/uiComponents in Magento 2 checkout depending on screen size

I have 2 html elements on my checkout for which I need to change the position on the page, depending on whether it's being displayed on mobile device or desktop. I cannot solve this using css only ...
0
votes
1answer
22 views

move discount block below order total in checkout_index_index in sidebar

i want to move discount block below order total on one-page-checkout, like below in screenshot I tried below code in checkout_index_index.xml but it is placing copon block in bottom <...
0
votes
2answers
13 views

Magento 2: How to add a phtml bloxk in cms page only?

I want to add a phtml but this phtml should only visible in all cms page only ? how can I implement this using layout XML method ?
0
votes
1answer
15 views

Magento 2 - How to find out where certain blocks are defined?

I try to remove some blocks on the 404 site: but I have no idea where they are defined. I searched in the layout file vendor\magento\module-catalog-search\view\frontend\layout\...
0
votes
1answer
28 views

Anybody know the Reference block name for the Footer->Miscellaneous HTML

Within Content->Design->Configuration->Theme->Footer->Miscellaneous HTML I have added some HTML and it works correctly However, I use a popup and it also displays at the bottom of the ...
0
votes
1answer
15 views

Generate the block with two ifconfig condition in layout xml

I prepared a code which masks the phone field. Since on some of our customer's website the customer does not enter input for phone field on register page, i need to put second condition to render this ...
0
votes
0answers
8 views

Magento 2: How to Add product type to cart price rule condition programmatically?

I'm using Magento v2.4.1. , Is there a way to add the product type as a condition in cart rule ?
0
votes
2answers
25 views

Magento 2 XML product_layout_view.xml conditional

I've got a simple block that I'm using to add a button directly next to "Add to Cart" <referenceBlock name="product.info.addtocart"> <block class="Magento\...
0
votes
3answers
57 views

Magento 2 Move related product above Product info tabs

i want to move , related product before product tabs, as highlighted by line in image. I tried below code but it seems not working and even the related product section is not showing: <move element=...
0
votes
1answer
46 views

Magento 2 - Custom Head PHTML showing in body

I am trying to create dynamic head using phtml on Magento 2.3.5 p1. I am inserting in default.xml the following: <page> <body> ... <referenceContainer name="head.additional&...
0
votes
0answers
46 views

Magento 2 - Admin Create Order. sales/order_create/loadBlock cant retrieve layout with <script type=“text/x-magento-init”>

When Creating an order via the admin. the forms are being loaded by http://localhost/project/Admin/sales/order_create/loadBlock/block/shipping_method,totals,billing_method?isAjax=true this request ...

1
2 3 4 5
56